Hi, I am having problems in reading the copyright character in Tomcat. Aside from passing -Dfile.encoding=ISO-8859-1, is there any place in Tomcat I can set how my application will read/write a text file? I'm currently having weird problem. Please refer to Character Encoding and Copyright Character to see detailed explanation of the problem. Here's my environment configuration. I have also indicated the system properties: 1. My PC (works fine here) - file.encoding=ISO-8859-1 - os.name=Windows XP - os.version=5.1 2. Company's Development Box (works fine here) - file.encoding=ISO-8859-1 - os.name=Linux - os.version=2.4.9-e.35 3. QA Box (doesn't work) - file.encoding=ISO-8859-1 - os.name=Linux - os.version=2.4.9-e.38smp Please help. Thank you very much. Regards, David
Are the versions of Tomcat between those 3 environments the same? You're using the same browser on the same machine to access all 3?
Have you tried explicitly setting the following: <%@ page pageEncoding="ISO-8859-1" %> <%@ page contentType="text/html;charset=ISO-8859-1" %>
(those are the defaults)
There is also a setting in $CATALINA_HOME/conf/web.xml The *.JSP servlet is configured by default to use UTF-8 in its generated source files. Control it with the 'javaEncoding' parameter.
Joined: Nov 30, 2001
Hi Mike, All three environments use Tomcat v3.3.1a. There's no conf/web.xml file in our Tomcat folder, I guess this file only exist for version 4x upward. And I'm using the browser on my PC to access webpages from 3 environments. I have the following code that reads the text file: