|
RE: [xml-dev] Problem: special characters replaced by different encoding
|
[
Lists Home |
Date Index |
Thread Index
]
OK sorry I didn't know that.
The problem is that this encoded string
isn't recognized anymore by the server where the XML came from when I send
it back for a second request. But like I said, I solved it using javascript.
It's not pretty, but it works.
Nicolas
"Michael Kay"
<michael.h.kay@ntlworld.com>
29/10/2003 05:00 PM
Please respond to
<michael.h.kay@ntlworld.com> |
|
To
| <nicolas.m@eurorscg.be>
|
cc
|
|
Subject
| RE: [xml-dev] Problem: special
characters replaced by different encoding in HREF |
|
XSLT questions are best asked
on the xsl-list at mulberrytech.com.
It looks as if your XSLT processor
is behaving correctly. You haven't said why you consider this correct behavior
to be a problem: what can't you do with the HTML output that you would
like to do?
Michael Kay
-----Original Message-----
From: nicolas.m@eurorscg.be [mailto:nicolas.m@eurorscg.be]
Sent: 29 October 2003 08:19
To: xml-dev@lists.xml.org
Subject: [xml-dev] Problem: special characters replaced by different
encoding in HREF
Hi
This is my HTML end result:
<a href=""content_recherche2.asp?p00=S%C3%A9rieyx,"
Herv%C3%A9">Sérieyx, Hervé</a>
As you can see I am using special (french in this case) characters. For
some reason the character "é" or "%E9" is replaced
by "%C3%A9". This is the XSL code:
<xsl:for-each select="contributor">
<xsl:variable
name="contributor_name" select="@name"/>
<a href=""content_recherche2.asp?p00={$contributor_name}"><xsl:value-of"
select="$contributor_name"/></a> <br />
</xsl:for-each>
The encoding is right when it is simply printed on screen but different
when used in the HREF tag. I'm assuming special characters are forbidden
in URL's and therefor replaced by unicode (?) characters. However I have
no idea how to revert them to their original encoding.
The header in my XSL is
<xsl:output method="html" encoding="iso-8859-1"/>
I've tried setting it to UTF-8 but that didn't change anything. The header
in the XML is
<?xml version="1.0" encoding="UTF-8"
standalone="no" ?>
Thanks in advance,
Nicolas
|
|
|
|
|