[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: utf-16 encoding

Subject: RE: utf-16 encoding
From: "Julian F. Reschke" <julian.reschke@xxxxxx>
Date: Fri, 29 Dec 2000 09:44:14 +0100
utf 16 encoding
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Kevin
> McCarthy
> Sent: Friday, December 29, 2000 3:42 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Cc: GarethS@xxxxxxxx
> Subject: Re:  utf-16 encoding
>
>
> Gareth,
> The only thing I've discovered is to open the xml file in question as text
> string using the filesystem object, and do a replace on the <?xml>
> processing instruction (or whatever it's called). It seems like any
> xmlDOM.Save(l_szFilePath) using msxml results in the encoding you've
> described.
>
> -Kevin

MSXML's DOM (ab)uses a Processing Instruction node holding the XML
declaration to remember which encoding to use when serializing the DOM using
the "save" method (you can even use that to modify the initial value read
during "read").

However, serializing to a string using the "xml" method *always* give you an
UTF-16 encoded string, as it is a 16 bit DCOM BSTR. Vice versa, "loadXML"
*only* takes a UTF-16 encoded string, and will generate an error when an XML
declaration with encoding != UTF-16 is present.

Julian



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.