Re: [xml] Unicode VS XML: Need help with char encoding in XML

On Mon, 2013-07-22 at 20:07 +0000, Fred Smith wrote:
I imagine my problem is due to my own ignorance of how char encodings work and how libxml2 handles them, 
but I’m growing frustrated with my inability to figure it out so thought to beg advice from the list.

    snprintf (tststr, sizeof(tststr), "Test %c Test", 0xC9);

You are generating something not valid as a Unicode text string in
UTF-8, the default encoding.

try, snprintf (tststr, sizeof(tststr), "Test %c%c Test", 0xC3, 0x89);

This email and any files transmitted with it are confidential

No. They are not confidential. You have sent them to a public archived
mailing list. I have answered your question even though I am clearly not
the "intended recipient". Please in future do not send confidential mail
to public lists.


Liam Quin - XML Activity Lead, W3C,
Pictures from old books:
Ankh: freenode/#xml

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