RE: [xsl] Special Characters in IE 6

Subject: RE: [xsl] Special Characters in IE 6
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 17 Jun 2003 17:05:39 -0400
[Rowlinson, Nicole SLGA]
> Thanks for your replies.  The only thing I am unsure of is why numeric
> entities like &#160; worked in IE 5.5, but in IE 6 it must be 
> changed to 
> <xsl:text 
> disable-output-escaping="yes">&amp;nbsp;</xsl:text>.  I know that
> IE 6 is supposed to be more "compliant" but I'm not sure what 
> is wrong with
> using the number code values.

This is not correct.  The character reference & # 160; __does__ produce
a non-breaking space in IE6 (I just tried it in service pack 1).  The
only reason there might be a problem in displaying is a character
encoding mismatch.  Not only that, it must be that the character
reference (& # 160;) must have been converted to an character character
as the html was created, because a numerical character reference in the
html file is independent of the encoding (at least, it is supposed to
be!).  

Naturally, this would happen as the result of an xslt transformation,
although if you were just typing an html file you could put the actual
character reference in.

Probably you are creating the html file in one encoding, and the browser
is set for another, and perhaps is being told the wrong encoding.

I just did a series of experiments on the display of & # 160;  I put the
character reference into the stylesheet as a literal.  I used a meta
element to tell the browser what the encoding is supposed to be.  I used
XML Cooktop, which runs IE to display the transformed results.  I used
the Microsoft msxml3 processor, which is I think what you normally have
with IE6.

Encoding specified    Encoding specified           Displayed results
in  xsl:output                in <meta>   
------------------------------------------------------------------------
------------                         
iso-8859-1                          utf-8
?
utf-8                                 iso-8859-1                       A
with top hat (caret)
utf-8                                    utf-8
correct
iso-8859-1                     iso-8859-1
correct


This is just what you would expect.  BTW, the meta syntax I used is this
-

<META http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>

The element needs to go into the head of the html document.

Cheers,

Tom P

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


Current Thread