hi,

since two weeks I'm fighting with a character encoding problem without
success: I send a JSP form to a Tomcat 4.03 servlet and log the form input
with log4j into a file and into a database. Running on a german server with
Suse Linux everything works fine. Now I installed Tomcat and servlet on a
Slackware server in the US and all special characters are logged as a
question mark. I tried everything I could get hands on in the mailing list
archive, without success:

- <%@ page contentType="text/html;charset=iso-8859-1" %> in the JSP

- <meta http-equiv="Content-Type" value="text/html; charset=iso-8859-1"> in
the JSP

- start tomcat with CATALINA_OPTS=-Dfile.encoding=iso-8859-1

- set environment variables LC_ALL=de;export LC_ALL and LANG=de;export LANG
(locale -a on slackware yields de, deutsch or german)

- request.setCharacterEncoding("iso-8859-1"); as first statement in
servlet.doPost()

- convert form parameters like: 
         byte[] bytes = param.getBytes("iso-8859-1");
         String convertedParam = new String( bytes, "iso-8859-1" );

I tried everything with iso-8859-1 and with UTF-8. 
With a perl script I have no problems handling the form input, so it must be
a Java/Tomcat problem. What else could I do to change the platform's default
encoding? 

please help
Wolfgang




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

Reply via email to