DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12105>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12105

UTF Encoding is not preserved





------- Additional Comments From [EMAIL PROTECTED]  2003-07-25 09:40 -------
I think I could isolate the problem that I experienced.
I seems to be related with the redirect extension, since I could not reproduce 
it without using this extension. Here is the test case.

The input :
-----------
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <link address="imag�.gif"/>
</root>


The transformation :
--------------------
<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:redirect="org.apache.xalan.lib.Redirect"
  extension-element-prefixes="redirect">

  <xsl:output method="html" encoding="UTF-8"/>

  <xsl:template match="root">
    <redirect:write file="image.html">
      <html>
        <body>
          <xsl:apply-templates/>
        </body>
      </html>
    </redirect:write>
  </xsl:template>

  <xsl:template match="link">
    <img src="[EMAIL PROTECTED]"/>
  </xsl:template>
</xsl:stylesheet>


The effective output (image.html) :
-----------------------------------
<html>
<body>

<img src="une imag%C3%A9.gif">
</body>
</html>

The expected output (image.html) :
------------------------------
<html>
<body>

<img src="une imag%E9.gif">
</body>
</html>


The src attribute is URL-encoded as expected. But the produced url is 
incorrect. 
The correct encoded value for � is %E9 and not %C3%A9. 
You can check it simply by opening image.html in a browser. The expected 
image.html will correctly display the image imag�.gif, but the effective 
image.html will not.
This bug was detected with Xalan 2.4.0, but is still present with Xalan 2.5.1

Reply via email to