computerline1z / okapi

Automatically exported from code.google.com/p/okapi
0 stars 0 forks source link

Non-auto-detected encodings not taken in account in XLIFFFilter #99

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When an XLIFF document has an encoding different from one auto-detected by 
the BomandEncoding detector, it is not set properly. The XML stream reader 
uses the one define for the Reader used in open(), but that one is the one 
from the auto-detector and may be wrong.

It seems we need to pass the rawdocument.stream to the open method, not 
use getReader(), but it seems we cannot because it has been used by the 
auto-detector.

Simple test: use a Windows-1252 xliff with some extended chars. they will 
come as Windows-1252 read as UTF-8.

Original issue reported on code.google.com by yves.sav...@gmail.com on 26 Jul 2009 at 10:18

GoogleCodeExporter commented 9 years ago
Its OK to use getStream after auto-detection because it resets the stream. Its 
one of
the exception cases where the caller can reset the stream properly for reuse.

Original comment by jhargrav...@gmail.com on 27 Jul 2009 at 5:49