Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Encoding problem of MSXML Encoding problem of MSXMLTo: NULL Date: 12/9/2008 1:27:00 AM
Hi, guys, I had a problem with MSXML.
I was trying to create a xml document in memory and save it as a utf-8
encoding file to disk, but I ended up with a ANSI encoding file:(, here is
the code:
#import "msxml4.dll"
using namespace MSXML2;
MSXML2::IXMLDOMDocumentPtr pXMLDoc;
pXMLDoc.CreateInstance( __uuidof(MSXML2::DOMDocument40) );
pXMLDoc->loadXML( L"<?xml version=\"1.0\" encoding=\"utf-8\"
?>\r\n<root>\r\n</root>" );
pXMLDoc->save( _variant_t("D:\\1.XML") );
I run this program under windows 2003 server R2 Simplied Chinese version
with MSXML 4.0 SP2
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
