Re: [xsl] XSL > XSL trans. and Characher Encoding

Subject: Re: [xsl] XSL > XSL trans. and Characher Encoding
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Tue, 16 Oct 2001 18:03:21 -0400
What everyone is telling you is that you probably ARE getting the character
you want.  But it may not DISPLAY as you expected when you look at it as a
text file with a text editor.  The character you SHOULD get is character #
160, which is equivalent to the &nbsp;.

There are two ways to find out whether you have gotten the right character:

1) look at the file with a hex viewer and you will be able to see if you got
a # 160 or its hex equivalent.

2) use the character is some html (generated by a stylesheet, not by cutting
and pasting with some editor), and see if it displays correctly (as a space)
when displayed by a browser.

There are no other ways to be certain (well, OK, you could write a program
to print out the numerical code value), because what gets displayed in an
editor is determined not only by the character and encoding, but by the
"display page" character set or its equivalent, which is set by the computer
or operating system.  So the encoding and the display character set may not
agree on what is supposed to be shown.

You will never see the text "&nbsp;" in the output because the processor
does have any way to know to output it.  And there is no HTML application
for which you really need it, since &#160; represents the same thing.

Cheers,

Tom P

[L Rutker]

I have read the FAQ yet I still do not understand.
please explain to me why I do not get a nbsp charachter when my XSL has
&#160 ?
Unless I write the output of the transform setting the encoding of my
OutputStream to "ISO-8859-1" as below I do not get the result I want.
How can I do this with UTF-8 and get the results that I want?
What am I doing wrong?



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


Current Thread