Re: [xsl] 8bit ascii encoding

Subject: Re: [xsl] 8bit ascii encoding
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 23 Aug 2002 10:58:18 +0100
> Hi David, you came back just in time... :)

You noticed I'd gone then:-)

> Yes, I tried this - the theory is that because the reference cannot be
> escaped using the current encoding it will get passed through to the
> output unchanged, right?

Not really it isn't a refernce by the time XSLT sees it, the XML parser
will have reported the reference as a character.
The theory is that in the XML and HTML output methods, any characters
not in the output encoding will be output as references.

> However, the project Im working on hosts IE through a JNI activeX
> control.  The result of the transform goes through the JNI string
> manipulation code ( in c ) which then gets to IE.  At which point the
> encoding seems to be wrong.

Possibly the feature you are seeing that if you call msxsl via some
methods it ignores the requested output encoding and always uses utf16.
Because some flavour of microsoft string object is always utf16.
Other methods of calling msxsl do use the requested encoding.
(Someone more microsoft-literate may fill in the details;-)

> Do you think that the BOM is going to be affected by this,
Yes BOM is a utf16 thing (to tell whether you are big or little
endian). So if the file is or is not utf16 you should or should not get
a BOM at the beginning.

>  as the c code
> is outputting single byte chars, or does that not matter to IE provided
> the <meta> encoding states utf-8? 

The <meta> element has to specify the encoding that the document is
in. If you change the specified encoding without changing the encoding
then you are dead.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


Current Thread