[izpack-changes] r1630 - izpack-src/trunk/src/lib/com/izforge/izpack/util
noreply at berlios.de
noreply at berlios.de
Fri Oct 20 11:15:25 CEST 2006
Author: bartzkau
Date: 2006-10-20 11:15:24 +0200 (Fri, 20 Oct 2006)
New Revision: 1630
Modified:
izpack-src/trunk/src/lib/com/izforge/izpack/util/VariableSubstitutor.java
Log:
Remove BOM fragments in inputstream to suppert xml files
with BOMs which are directly substituted.
Modified: izpack-src/trunk/src/lib/com/izforge/izpack/util/VariableSubstitutor.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/util/VariableSubstitutor.java 2006-10-19 18:21:41 UTC (rev 1629)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/util/VariableSubstitutor.java 2006-10-20 09:15:24 UTC (rev 1630)
@@ -280,6 +280,17 @@
// Copy data and substitute variables
int c = reader.read();
+ // Ignore BOM of UTF-8
+ if( c == 0xEF )
+ {
+ for (int i = 0; i < 2; i++)
+ {
+ c = reader.read();
+ }
+ }
+ // Ignore quaint return values at UTF-8 BOMs.
+ if( c > 0xFF )
+ c = reader.read();
while (true)
{
// Find the next potential variable reference or EOF
More information about the izpack-changes
mailing list