[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] UTF-8, RTF and XSLT


Subject: Re: [xsl] UTF-8, RTF and XSLT
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 8 Nov 2002 16:19:35 GMT

> If I open it in a pure text 
> editor, then theData appears as two arbitrary characters and not a 
> single &Aring;.

yes becaue (as you indicated, utf8 is multi-byte).
But teh output is not utf8 because the input is, it is because that is
the default output encoding of your system and if you go
<xsl:output type="text" encoding="iso-8859-1"/>
it'll output in latin 1.

Not ein xml output unencoded characters will be output as &#.... 9unless
tehy appear in element names, which is an error) but in text output
unencoded characters are an error, but as long as you output to an
encoding that covers the characters in your file, you should be fine.


<xsl:output method="text" version="1.0" encoding="theEncoding" 
                                                  ^^^^^^^^^^^

if that is iso-8869-1 then it should work, shouldn't it?

indent="yes" omit-xml-declaration="yes"/>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

these two are not needed (and don't do anything) in text output

> and is not coerced into a different encoding.

An XSLT system is only obliged to support utf8 and utf16, but pretty much
all of them I have tried support at least iso-8859-1 as well, which
system are you using?

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
Keywords