Re: [xml] UTF16 output broken in 2.5.8 (WIN32)?



On Fri, Jul 18, 2003 at 05:15:12PM +0200, Peter Jacobi wrote:
Dear Daniel, All,

In my project of fixing the 8859-* encodings, Im at the stage of
preparing the test cases.

Now a strange behaviour strucks me:

using command lines like:

xmllint --encode utf16 foo.xml

I get at best scrambled output:

  Works for me:

paphio:~/XML -> xmllint --encode utf16 test/utf8bom.xml > res
paphio:~/XML -> xmllint res
ÿþ<?xml version="1.0" encoding="utf16"?>
<foo/>
paphio:~/XML ->

  the two fist chars are a BOM (Byte Order Mark) and should be preserved.

- a iconv-less statically linked, self compiled version outputs nothing at 
all (this may be the intended behaviour - does libxml2 uses iconv for 
UTF16?)

  No, that's not normal, libxml2 uses internal UTF-16 routines.
Check the name UTF-16 might be the only one supported by libxml2 directly
other aliases might be provided by iconv though.

- Igor's binary (with iconv) outputs invalid UTF16 ( ... 0d 0a ... at line 
breaks)

  Windows crap in action, sorry ...

It seems we discussed the problem in the thread "final output filtering",
but no (or incomplete) action was taken.

As there are already some occurences of "wb", shall I replace the remaining 
"w" with "wb"?

  yeah, seems it should not break anything finally...

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]