[xsl] RE: FW: ] Top Ten Java and XSLT Tips, #5

Subject: [xsl] RE: FW: ] Top Ten Java and XSLT Tips, #5
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 5 Sep 2001 02:47:09 -0700 (PDT)
> > that's what you see if you look at the utf8 encoding of the 
> > character in a latin1 encoded window.
> > 
> > IE5 on windows will only do that if you set it up wrong: 
> > forcing it to use the latin1 encoding even if the document 
> > specifies utf8.
> > 
> > Much as I'd prefer to blame microsoft I suspect user error in 
> > this case.
> It doesn't work on IE6 final either. At least the final I have here. It
> displays &#160; as A^  AND for some reason all of the encodings are
> greyed out and the only one available is western encoding (windows). 

It works perfectly with IE6, but you should generate a META tag with the right
encoding as Julian Reschke correctly suggested.

The following stylesheet when applied on any xml input will produce output, which is
correctly displayed by IE6.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
    <xsl:output method="xml" encoding="UTF-8"/>
    <xsl:template match="/">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>


The output produced is displayed by IE6 as:

test1 test2 

Dimitre Novatchev.

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

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

Current Thread