tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <atu...@tr.net>
Subject Character Encoding Problem
Date Mon, 02 Jul 2001 08:33:18 GMT
Hi,

I know that this is a popular (!?) problem in tomcat. Dur despite my efforts I could not find
any solution. Here it goes:

We have jsp page in encoding type ISO-8859-9. With the line
<%@ page contentType = "text/html; charset=ISO-8859-9" %>
we define the encoding type of the document.

Result:
The strings in the jsp file are encoded correctly, like
- The text in html
- the text written inside jsp code between <%, %>

Problem:
The strings that are recevied from a class, read from a file, inside a constant are not encoded
correctly.

<%= "Pretend to be a ISO8859-9 string" %> is encoded correctly but,
inside a class let's say we have
String x = "Pretend to be a ISO8859-9 string";
then
<%= myClass.c %> is encoded wrong with many ?'s

The problem is not in JVM/JDK, I think, as I read a file and write the content into another
file, both files are the same with no loss in encoding.

Also the encoding problem is there when I include files with
<jsp:include ..
If I include the file with <%@ include .. the problem is
not there .. But I really need to use <jsp:include ..

Can anyone solve my problem ?? ..

Arif Tumer ..


Mime
View raw message