From: Christophe de V. <cde...@al...> - 2003-12-02 16:08:18
|
Rainer Stransky wrote: >I use libxml++ in a application dealing with iso-8859-2. > >When creating a xmlpp::Document including special characaters (valid within >iso8859-2) the method-call document.write_to_string("iso-8859-2") (see code >below) puts a error message to stdout: > output conversion failed due to conv error > Bytes: 0xB5 0x72 0x61 0x69 > > > iconv cannot convert your datas from UTF-8 to ISO-8859-2. >and the resulting xml-string is corrupted (truncated at the postion of the >special character (Dec 174) > >What is the problem ? Do i use libxml++ in a wrong manner ? > > > Don't forget that whatever you final document encoding is, the in-memory encoding that libxml2 uses is UTF-8. As a consequence all strings you give to libxml++ should be UTF-8 encoded. So I suggest you check that you give UTF-8 strings to the API. Cheers, Christophe |