Re: [xml] character conversion



On 3/28/2017 23:10, Tomas By wrote:
I have a "xmlNode*" that comes from a file, which is typically UTF-8 but could be (I assume) any other encoding supported by the installation.
If it is a TEXT node, I want to get the content, as a string, in CP 850.

The content encoding of the file doesn't matter, when parsed libxml2 stores everything internally as UTF-8. Functions like xmlNodeGetContent will give you the content in UTF-8, which you can manually convert to CP 850.



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