[xml] Another encoding problem when not using iconv
- From: <mark itzcovitz ntlworld com>
- To: xml gnome org
- Subject: [xml] Another encoding problem when not using iconv
- Date: Wed, 30 Jul 2003 14:54:24 +0000
There is a problem in the UTF8ToUTF16xx conversion routines in encoding.c. The last parameter is a pointer to
the length of the input, which xmlCharEncOutFunc expects to be modified to be the number of characters in the
input that have been processed. Other routines such as UTF8Toisolat1 do this but the UTF8ToUTF16xx routines
seem to set it to 0. This means that xmlCharEncOutFunc doesn't remove the processed input from the input
buffer.
The problem can be verified by running the attached xml document (converted to utf-16 from slashdot.xml in
the test suite) through a version of xmllint built without iconv - it never ends!
A patch is attached containing changes for UTF8ToUTF16LE and UTF8ToUTF16BE.
-----------------------------------------
Email provided by http://www.ntlhome.com/
ÿþ<