[xml] Special characters in xslt (html) output

I have a problem. I use libxml2 and libxslt from my MSVC application. I have
managed to find out about most of my needs but I have a problem with special
characters such as å (aring), ä (auml) and ö (ouml). I provide my XSLT
stylesheet parameters with the filename I want to use in UTF-8 format.

I give the stylesheet parameters dir=yrjö3  first=""

It works OK if I donät have teh character ö in the dir.

My stylesheet is:
<xsl:stylesheet version = '1.0'

<xsl:template match="raport">

<xsl:variable name="lname" select="$dir"/>
<xsl:variable name="lfirst" select="$first" />
<xsl:output method="html" encoding="ISO-8859-1"/>
  <frameset rows="15%,*"  cols="25%,*">
    <frame name="logo" src="{$lname}/home.html" />
    <frame name="hdr"  src="{$lname}/hdr.html" />
    <frame name="idx" src="{$lname}/idx.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0"/>
    <frame name="data" src="{$lname}/data{$first}.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0"/>

and the resulting html file is:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<frameset rows="15%,*" cols="25%,*">
<frame name="logo" src="yrj%C3%B63_files/home.html">
<frame name="hdr" src="yrj%C3%B63_files/hdr.html">
<frame name="idx" src="yrj%C3%B63_files/idx.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0">
<frame name="data" src="yrj%C3%B63_files/data.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0">

Why is ö converted to %C3%B6 ? How can I make it the ö-character?


Kaarle Kaila
email: kaarle dot kaila at iki dot fi

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]