Re: [xsl] character encoding problem/question

Subject: Re: [xsl] character encoding problem/question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 8 May 2002 17:23:06 +0100
> I am creating xml docs out of MS Word using YAWC, and
> for my single quotes, it is generating &#8217; (

which is the right thing.

> I then convert the xml doc I get into
> another xml doc, which I then convert into XHTML.

In the last transform, assuming that you are using 
<xsl:output method="html"
which is the default method if the top level element is <html>
then many XSLT systems will output this as &rsquo; and your problems
probably go away, but your system appears to  be outputting as 
utf08 (I didn't check the three byte sequence you quoted was the correct
utf8 for this character but chances are it is.)

If the HTML document is in utf8 and says it is in utf8 (by having a
charset specified in the HTML, something XSLT should add automatically)
then modern browsers should display it correctly.

If the automatic detection of encoding has failed you can push the
browser by hand (view/encoding menu in IE for example).

Alternatively you can output in some other encoding eg
<xsl:output type="html" encoding="iso-8859-1"/>
will output in latin-1 which means the system can not output this
character as character data so will use &#8217; or &rsquo; or &#x2019;
which mightalso keep your browser happy.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

Current Thread