This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: character encoding problem/question



> I am creating xml docs out of MS Word using YAWC, and
> for my single quotes, it is generating ’ (

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.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]