tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Char Encoding text streams on Tomcat 5.5 and Linux
Date Tue, 01 Dec 2009 00:39:24 GMT
Christopher Schultz wrote:
> Hash: SHA1
> André,
>> That applies also to webapps which read posted input, unless you are
>> careful.
> No! The default encoding for servlets is ISO-8859-1 unless the client
> specifies the encoding (which many do not). The value for file.encoding
> is not used here, unless there is a horrendous bug in Tomcat.
Well, just make a simple test :
(I don't really know how to handle JSP pages, I only do servlets and 
filters, otherwise I'd do it myself).
-  create a simple html form with a UTF-8 charset, with a simple text 
input box. Give it a method=POST.
- create a simple webapp which just echoes the input box content
- then start Tomcat alternatively under a UTF-8 locale, then an 
ISO-8859-1 locale, type some accented characters in your input box, and 
submit the form.

I'm curious about the horrendous bug, because I have seen phenomenons 
like this.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message