Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Non-breaking spaces with multiple charsets

From: "Anthony Jones" <Ant@------------.--->
To: NULL
Date: 9/8/2006 1:00:00 PM


"Simon Caldwell" <simonjcaldwell@g...> wrote in message
news:1157706909.106250.147740@e......
> When we need a non-breaking space from an xsl, we've been happily using
> &#160; as usually recommended.
> However, we now have a need to support different charsets, for instance
> Big5, and this does not render &#160; as expected.
>
> For instance, the code snippet given below will output a non-breaking
> space for charset iso-8859-1.  But for charset Big5 we get "?/TD>"
> instead.
>
> So the question is - how can we code this so that it will work
> regardless of charset?
>
> TIA
>
> Simon
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
> <xsl:template match="/">
> <TABLE WIDTH="100%" BORDER="0" CELLSPACING="1" CELLPADDING="3"
> ALIGN="center" BGCOLOR="#999999">
> <TR>
> <TD>&#160;</TD>
> </TR>
> </TABLE>
> </xsl:template>
> </xsl:stylesheet>

The above xsl outputs UTF-8.  If you change the xsl:ouput encoding to BIG5
the non-breaking space comes out as a ? because there is no equivalent in
BIG5.  Try &#127; instead for BIG5.  It's a kludge but it should work.





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent