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

Re: [xsl] Character substitution

Subject: Re: [xsl] Character substitution
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 10 Jan 2005 10:54:08 GMT

> I get a nice little euro symbol

you are relying on incorrect encoding support in your system (or at best
relying on explictly undefined behaviour).

Your input has a reference to unicode 128. that is a control character
(on the meaning of which you explitly shouldn't depend).

You copy that to the output, so you have that character in the result

Now if you output to ISO-8859-1 then probably you should get the same
control character (ie byte 128). If your browser happens to decide to be
non conformant but friendly and show that as a euro, that's either good
or bad, depending on your point of view. If you output to Windows-1252
then that doesn't have those control characters (as the space is taken
up with extra printing symbols) so you should get a fatal encoding error
telling you that you can't linearise character 128 into the windows
encoding (as that slot is taken up to linearise character 8364).  If
however the encoding support silently lineraises both 128 and 8364 on to
the same slot (so destroying the round tripping that is supposed to be
preserved by linearisation) you will see a euro, but whether that is
good or bad depends on your point of view...


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

Current Thread