Sounds as if you are generating HTML output encoded in UTF-8 but the browser
is displaying it under the impression that it is in iso-8859-1.
Firstly check (with a hex editor) that the HTML is indeed in UTF-8 and that
it has a <meta> tag saying so.
Then try to check what the HTTP headers say when the web server delivers the
document (or is your browser reading it from a local file?). Changing web
server and browser configurations should fix the problem (but don't ask me
exactly how).
The alternative is to try producing the HTML output in iso-8859-1 encoding,
which you can do by adding an encoding attribute to the xsl:output element
on (preferably) the top-level stylesheet module.
Incidentally, all the output produced by your stylesheet is governed by the
xsl:output properties with highest import precedence - there's no linkage
between the module from which the output was generated and the module in
which the xsl:output declaration occurs.
Michael Kay
-----Original Message-----
From: Gordon Ross [mailto:G(_dot_)Ross(_at_)ccw(_dot_)gov(_dot_)uk]
Sent: 13 August 2004 10:45
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Problems generating w-circumflex character for
HTML output
Hi,
I'm using three XSLT files to generate an HTML output.
The first, is a base file - this generates the actual HTML.
This has the output encoding of <xsl:output method="html"/>
The second, just contains a series of <xsl:variable> elements
to define text strings (I have multiple versions of this
second file for different languages) This has the output
encoding of <xsl:output method="xml"/>
The third just imports the first two (again, there is one per
language), it has the <xsl:output method="html"/> tag.
All three files have their encoding set to UTF-8
Some of my xsl:variable values have unicode characters in.
Mostly, they work fine if I just use the &#x....; format to
specify the unicode character. (e.g. â gives me a
lower-case a with a circumflex on it)
However, I'm having great dificulty trying to generate a
lower-case w with a circumflex.
The unicode character for this is 0175(hex) If I put that in
my stylesheet, I get a captial a with a circle above it
followed by a greek u in the final HTML output.
In HTML the w-circumflex character is defined as ŵ -
and if I put that in an HTML document it displays fine.
I'm using Xalan 2.6.0 as my XSLT engine.
What silly mistake am I making ? What can I do to generate a
w-circumflex ?
Thanks,
GTG
Gordon Ross,
Network Manager/Rheolwr Rhydwaith
Countryside Council for Wales/Cyngor Cefn Gwlad Cymru
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--