| Subject: [xsl] Perl workaround for XSLT escaped UTF-8 pass-thru to XHTML From: Gan Uesli Starling <alias@xxxxxxxxxxx> Date: Fri, 21 Mar 2003 18:09:27 -0500 | 
I have an XML here...
http://starling.ws/XML/howto.xml
...which uses this XSLT...
http://starling.ws/XML/howto.xsl
...and looks fine when viewed in either Mozilla 1.2.1 or MSIE 6 SP 1 as *.xml.
But when I use that same XSLT to output to *.html as a file, then go to view it as *.html with those same browsers then the UTF-8 (since it is not escaped with ampersand-pound) does not display...
Nobody answered my plea about passing escaped UTF-8 thru from XML to HTML. So I cobbled my own ex-post-facto Perl solution. Not elegant, but at least it works. See results at...
...which should work for most browsers and not just Mozilla 1.2.1 and MSIE 6 SP 1.
Here is the Perl script. What it does is reads in all *.html files and translates a list of UTF-8 chars to their escaped-for- HTML identical twins. The list of chars is for Esperanto and some arrow glyphs. Feel free to add more.
 <(+)__       Gan Uesli Starling
  ((__/)=-    Kalamazoo, MI, USA
   `||`
    ++        http://starling.us| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| [xsl] XML -> XHTML with UTF-8 escap, Gan Uesli Starling | Thread | Re: [xsl] Perl workaround for XSLT , Mike Brown | 
| RE: [xsl] sort problem, Michael Kay | Date | Re: [xsl] A list of useful function, Peter Flynn | 
| Month |