xsl-list
[Top] [All Lists]

RE: non-breaking spaces in html tables

2004-01-20 17:03:02
Check your output encoding. It sounds like you are outputting UTF-8, but your 
browser is interpreting it as a single byte encoding (ISO-8859-1 perhaps?)

The character &#A0; becomes the two bytes 0xC2A0 when encoded in UTF-8 and is 
left as a single byte, 0xA0, in ISO-8859-1.

When your browser reads the UTF-8 data as Windows Western character set 
(ISO-8859-1) it sees two characters, the  that is the 0xC2 character, and the 
no-break space, 0xA0.

Hope this helps,
Josh

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of
walter(_dot_)crockett(_at_)ascentialsoftware(_dot_)com
Sent: Tuesday, January 20, 2004 3:07 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] non-breaking spaces in html tables


I am using XSL to create a table in HTML. I need the cells to have borders
even when nothing is in them. 
In the past I did this by adding non-breaking spaces with " ", for
example:

<td><a href="{$ConnectedTableName}.htm"><xsl:value-of
select="$ConnectedTableName"/></a>&#160;</td>

This was working fine in August, but now instead of a non-breaking space I
get an A with a little curly thing on top of it.

So I switched to:

<td><a href="{$ConnectedTableName}.htm"><xsl:value-of
select="$ConnectedTableName"/></a><xsl:text>&#xa0;</xsl:text></td>

This works fine when I test it in XML Spy, but still produces the strange
character when I run it in our product using MSXML4.

Has something changed in the recent versions of MSXML4 that is screwing me
up, or am I using outmoded code?

Yours,
Walter Crockett

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


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



<Prev in Thread] Current Thread [Next in Thread>