Hello
I have a problem which I think is related to UTF-8 encoding and my browser (IE6).
I am outputting XML data via a Java servlet and transforming it with an XSLT stylesheet using Xalan. Do I need to use a call such as:
in my Java code to encode the XML data? Currently I do not, and it DISPLAYS correctly, but creates a link on the page with an invalid href since the characters are not coded correctly.
The link includes the name of an author ("Suárez") as a search parameter. The a should have a grave accent over it. It is displaying this correctly but when I hover over the link I see that it is encoded as a capital Ai with a tilde over the A. This then means the search for this author returns no results.
This is what I get:
This is what I want:
I have the encoding attribute set to "UTF-8" in my XSLT stylesheet.
(If I encode the bytes in the Java code with UTF-8 it displays a small square character instead of the "a" with a grave accent over it.)
Hopefully someone here can offer advice.
Thanks in advance.
I have a problem which I think is related to UTF-8 encoding and my browser (IE6).
I am outputting XML data via a Java servlet and transforming it with an XSLT stylesheet using Xalan. Do I need to use a call such as:
Code:
baos.toString("UTF-8")
in my Java code to encode the XML data? Currently I do not, and it DISPLAYS correctly, but creates a link on the page with an invalid href since the characters are not coded correctly.
The link includes the name of an author ("Suárez") as a search parameter. The a should have a grave accent over it. It is displaying this correctly but when I hover over the link I see that it is encoded as a capital Ai with a tilde over the A. This then means the search for this author returns no results.
This is what I get:
This is what I want:
I have the encoding attribute set to "UTF-8" in my XSLT stylesheet.
(If I encode the bytes in the Java code with UTF-8 it displays a small square character instead of the "a" with a grave accent over it.)
Hopefully someone here can offer advice.
Thanks in advance.