Subject: RE: How to deal with special characters in XSL?
From: "Julian Reschke" <julian.reschke@xxxxxx>
Date: Thu, 18 Oct 2001 09:51:22 +0200
|
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Thomas B.
> Passin
> Sent: Wednesday, October 17, 2001 11:19 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: How to deal with special characters in XSL?
>
>
> I decided to try it out myself. See the xslt file at the end of
> this post.
> It produces a
> table cell with some text and two non-breaking spaces. Output encoding is
> utf-8 (iso-8859-1 seems to produce the expected results). This is on
> Windows2000, in a command line session. I did a copy-and-paste from the
> command line results.
>
> Three processors, xt, 4xslt and saxon, actually output the characters
> " ". Two others, sablotron v 0.7 and msxsl (using msxml3) output
> strange looking characters that, in examining the hex, turned out
> to be hex
> C2 A0. Now A0 is hex for 160. I assume that C2 A0 is correct for UTF-8?
> Anyone know for sure?
Yes.
> The C2 A0 do not display as a nonbreaking space in IE5.5 on my system. I
> assume that's because it doesn't know that the file is in utf-8.
Yes. So you'll need to tell it. If it's HTML, you'll have to set the proper
META tag.
> If I use iso-8859-1 encoding, the output from those two
> processors is A0, as
> expected. The upshot is that if you output in utf-8, the browser may not
> know that, and so display the character incorrectly. I'm not sure how to
> inform the browser about the encoding.
See the thread in:
<http://www.biglist.com/lists/xsl-list/archives/200109/msg00146.html>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|