Re: [xml] New user - UTF-16 issue

* <Ramsundar_Govindaraj Dell com> wrote:
1.       I have an xml file called b.xml whose encoding attribute is UTF-16. (attached along with this email)

Your file is fine, and it is fine to read the raw bits into memory and
pass that memory to libxml2 (without specifying an encoding). So the
contents of the file is getting corrupted either by how you add it to
your project, or by how you are reading it into memory. libxml2 will
determine the correct encoding from the raw bits, you should treat it
as having some unknown binary content at all steps through the process.
Björn Höhrmann · mailto:bjoern hoehrmann de ·
Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · 

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