Hello!

I've tried my luck with Tomcat 5.5 and found that it behaves different 
than 5.0.27 does as regards character encoding. Somehow the conversion 
from ISO-8859-1 to UTF-8 doesn't work as it should. This may well be 
due to a misconfiguration. See below for the JSP document and the two 
different output pages generated. It looks as if Tomcat 5.5 applies the 
ISO-8859-1 to UTF-8 conversion twice. I'm editing the JSP document with 
Eclipse 3.1M1 and the text file encoding is set to ISO-8859-1.

I'm still pretty new to servlets, JSP, and Tomcat, so I might be 
overlooking something rather obvious.

Michael


test.jspx:
---->---->---->----
<?xml version="1.0" encoding="ISO-8859-1"?>

<html xmlns="http://www.w3.org/1999/xhtml";
 xmlns:jsp="http://java.sun.com/JSP/Page";
 xmlns:c="http://java.sun.com/jsp/jstl/core";
 xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
 lang='de'
>

  <jsp:output doctype-root-element="html"
   doctype-public="-//W3C//DTD XHTML Strict 1.0//EN"
   doctype-system="http://www.w3.org/TR/xhtml-basic/xhtml1-strict.dtd"; />

  <jsp:directive.page contentType="text/html" />
  <jsp:directive.page session="false" />

  <head>
    <title>Test</title>
  </head>

  <body>

    Ã<br/>
    Ã<br/>
    Ã<br/>
    Ã<br/>
    Ã<br/>
    Ã<br/>
    "&#160;"<br/>

  </body>
</html>
---->---->---->----

With Tomcat 5.5 (wrong)
http://localhost:8080/myapp/test.jspx:
---->---->---->----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Strict 1.0//EN" 
"http://www.w3.org/TR/xhtml-basic/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; 
lang="de"><head><title>Test</title></head><body>

    ÃÂÃÂÂ<br/>
    ÃÂÃÂ<br/>
    ÃÂÃÂ<br/>
    ÃÂÃÂ<br/>
    ÃÂÃÂ<br/>
    ÃÂÃÂ<br/>
    "ÃÂÃÂ"<br/></body></html>
---->---->---->----

With Tomcat 5.0.27 (correct)
http://localhost:8080/myapp/test.jspx:
---->---->---->----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Strict 1.0//EN" 
"http://www.w3.org/TR/xhtml-basic/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; 
lang="de"><head><title>Test</title></head><body>

    ÃÂ<br/>
    ÃÂ<br/>
    ÃÂ<br/>
    ÃÂ<br/>
    ÃÂ<br/>
    ÃÂ<br/>
    "ÃÂ"<br/></body></html>
---->---->---->----

-- 
Michael Schuerig            I was blessed with a birth and a death and
mailto:[EMAIL PROTECTED]     I guess I just want some say in between
http://www.schuerig.de/michael/         --Ani DiFranco, Talk To Me Now

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to