Re: [xsl] distorting special characters

Subject: Re: [xsl] distorting special characters
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 4 Nov 2003 17:14:51 GMT
> I am trying to preserve the encoding.
XSLT has no record of the original encoding so you can not automatically
preserve the encoding/


> This is what i get out of the transformation process:

That is the utf8 encoding. Evety XML application must understand utf8 so
that is really the best to use, but if you are seeing accented capital
As then you are looking at it in  a system that thinks it is latin 1. If
you can't fix teh system to understand utf8 then you can probably
getxslt to output in latin 1 by adding <xsl:output
encoding="iso-8859-1"/>

However in your case this will not work as
a) 8482 is not in latin 1 and
b) you are using the text output method in plain text there is no
possibility of encoding characters that are not in the encoding
as you have no & markup syntax, so you need to choose an encoding that
contains all the characters that you are using. As utf8 includes all of
unicode this really is a good choice here.

> disable-output-escaping="yes"

It's almost always a bad idea to use disable-output-escaping but here it
does nothing at all as you are using teh text output method which never
does any XML escaping anyway, so there is nothing to disable.


If you really mean you want to see & #  1 2 3 4; syntax on output, then
you want the xml output method, not text, and choose any encoding that
does not include that character (eg latin 1)

David


-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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


Current Thread