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

On Mon, Jul 22, 2013 at 04:43:47PM -0400, Liam R E Quin wrote:
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);

  reading the doc may help too

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.

  Indeed, fix your mail, or post from gmail (for example), that's

c.f. the section in red,



Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit | virtualization library

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