This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: utf-16 encoding


For now my solution's been (in case I do not really need to specify an
encoding) to completely suppress the generation of the xml declaration:

<xsl:output omit-xml-declaration="yes"/>

Dimitre.


Julian F. Reschke wrote:

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


__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]