tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28966] New: - JSP pages with UTF-8 characters always displays as ISO-8859-1
Date Fri, 14 May 2004 02:29:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28966>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28966

JSP pages with UTF-8 characters always displays as ISO-8859-1

           Summary: JSP pages with UTF-8 characters always displays as ISO-
                    8859-1
           Product: Tomcat 5
           Version: 5.0.23
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: johnconstable@aol.com


I have searched the web thoroughly for days now, as well as the bug database,
and I am convinced this problem isn't posted anywhere.

I have a website that talks to an Oracle database.  The Oracle database stores
most strings in UTF-8 format.  Everything works fine when Tomcat is run on
Win2k, XP, Mac OSX, and Solaris 8, but when I try to run the application on
Linux, the UTF-8 characters display as if ISO-8859-1 is being used.

I have tried the following fixes:
added the charset filter that everyone speaks of to web.xml
set environment variables such as JAVA_OPTS=-Dfile.encoding="UTF-8", LANG=UTF-8
and LANG=us_US.UTF-8

Even with these changes, I still get the ISO representation.

Adding <%@ page contentType= "text/html;charset=UTF-8" pageEncoding= "UTF-8" %>
to the JSPs forced the encoding in the HTTP headers to UTF-8 (they were by
default ISO_8859-1), but the result was identical.  On all the other platforms,
the encoding is already UTF-8 before any of these changes.

Now here is the part that really blows my mind.  If I save the JSP from another
server (with correct UTF-8 encoding), and put it on my server as an .html file,
Tomcat serves it up perfectly.  Headers are right, text displays, all is well. 
If I rename this to a .jsp, once again, the problem returns.

For this reason I am sure it isnt the DB.  Is there something in Jasper maybe
that could be imposing an incorrect charset onto files in Linux?  Once again,
this problem only seems to exist on Linux, in both AS 2.4, as well as the newest
Fedora.

Thanks!

John

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message