Re: [xsl] escaping an accented character

Subject: Re: [xsl] escaping an accented character
From: Peter Hollingsworth <peter@xxxxxxxxxxxxxxxxx>
Date: Tue, 13 Jan 2004 22:05:22 -0800
OK, sorry to be so dense, but your reference says the following:

We recommend that user agents adopt the following convention
for handling non-ASCII characters in such cases:
1. Represent each character in UTF-8 (see [RFC2279]) as one or more bytes.
2. Escape these bytes with the URI escaping mechanism (i.e., by converting
each byte to %HH, where HH is the hexadecimal notation of the byte value).

So following the instructions, I take the character for à, which according to everything I can find is 224. I convert this to hex, E0. Voila, the escaped value is %E0. Where do you get %C3%A0 out of this? Obviously the xsl parser agrees with you, but I don't see where the value is coming from.



At 10:09 PM 1/13/2004 +0100, you wrote:
Peter Hollingsworth wrote:

The character à ('a' with a grave accent) appears in a node in my XML. When I use an XSLT to display the node in an href for link in an html page, the character gets escaped as %C3%A0, which is completely wrong (it should be escaped as %E0). Similar problems occur with all accented characters.

It's exactly the right thing. See:


Both the XSL and the XML file have encoding="UTF-8" (unicode, I believe).

That's irrelevant here.

Any suggestions? Thanks.

Fix the server, if you can. The URI is just fine.


<green/>bytes GmbH -- -- tel:+492512807760

XSL-List info and archive:

XSL-List info and archive:

Current Thread