You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by at...@tr.net on 2001/07/02 10:33:18 UTC
Character Encoding Problem
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 ..