The attachment is this:
"

[CUSTOMER_DETAILS]

CompanyName = Noʓneʓ
CustomerContactName = fooʎ barʎ

"


----- Original Message ----
From: Mihai Matei <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, May 18, 2007 10:40:36 AM
Subject: UTF-8 characters in CDATA section

Hi,

I'm trying to add the attached file's contents to a CDATA section in an xml. It 
contains a few Unicode-UTF8 characters from 
http://www.columbia.edu/kermit/utf8-t1.html. (you can view the file with 
Firefox, set the Character Encoding to Unicode(UTF8)).

//string 'text' has the contents;
//if I output it to a file with ofstream, the UTF8 characters are preserved

DOMElement* pText = pDoc->createElement( X(tag.c_str()));
DOMCDATASection* pCdata =
 pDoc->createCDATASection(X(text.c_str()));
pText->appendChild(pCdata);
parent->appendChild(pText);

the resulting xml however loses the UTF-8 characters. Is it the X() macro that 
is to blame, or can I set other XML Document properties so
 I keep my UTF8 chars?

Thanks.



      Got a little couch potato? 

Check out fun summer activities for kids.





      Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 







 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

Reply via email to