This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xml:output encoding as iso-8859-1 always comes out as UTF- 16
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] xml:output encoding as iso-8859-1 always comes out as UTF- 16
- From: "Andrew Kimball" <akimball at microsoft dot com>
- Date: Fri, 2 Mar 2001 11:44:57 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
- Thread-Index: AcCjQYWOn6/Wv+njTxebX+6egxNBvAADs2Vg
- Thread-Topic: [xsl] xml:output encoding as iso-8859-1 always comes out as UTF- 16
If the object you're trying to write into implements IStream or
ISequentialStream, you can use:
xmlDOMSource.transformNodeToObject(xmlDOMHTMLStyle, myts)
This will send an unmodified stream of bytes (encoded as you requested)
to your output stream (using IStream::Write). Using transformNode must
first convert to a BSTR, which is a string rather than a stream of
bytes.
If you only need to do a batch-mode transformation, you can use the
MSXSL command-line tool (which handles encodings as you expect). This
can be downloaded from http://msdn.microsoft.com/downloads/default.asp.
Click on Web Development/XML/XSL/MSXSL.EXE Command Line Transformation
Utility.
~Andy Kimball
MSXSL Dev
-----Original Message-----
From: Neil Hunter [mailto:HunterN@rsc.org]
Sent: Friday, March 02, 2001 5:49 AM
To: 'xsl-list@lists.mulberrytech.com'
Subject: [xsl] xml:output encoding as iso-8859-1 always comes out as
UTF- 16
Hi,
I am using MSXML3 with:
<xsl:output method="html" encoding="iso-8859-1"/>
but in the output I always get:
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
However, in Saxon I get what I am expecting:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
I don't have much hair left to pull out.....
Thanks,
Neil.
ICT, The Royal Society of Chemistry
http://www.rsc.org
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list