You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mariusz Wiktorczyk <ko...@fanthom.math.put.poznan.pl> on 2003/04/02 16:53:06 UTC

Problem with character encoding.

Hi.
I have small web app with text fields (Struts <html:text/>). When user 
types some strange character from UTF-8
(see http://fanthom.math.put.poznan.pl/~kosmat/problem/source.jpg)
the output is different.
(see http://fanthom.math.put.poznan.pl/~kosmat/problem/result.jpg)
How can I force Tomcat to use UTF-8 character encoding?
(response.setContentType("text/html; charset=UTF-8"); and 
System.setProperty("file.encoding", "UTF-8"); does not work)

Mariusz Wiktorczyk
Tomcat 4.1.12 & Struts 1.1 RC1





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with character encoding.

Posted by Mariusz Wiktorczyk <ko...@fanthom.math.put.poznan.pl>.

Boris Folgmann wrote:

>Mariusz Wiktorczyk schrieb:
>
>  
>
>>I have small web app with text fields (Struts <html:text/>). When user 
>>types some strange character from UTF-8
>>(see http://fanthom.math.put.poznan.pl/~kosmat/problem/source.jpg)
>>the output is different.
>>    
>>
>
>Do you store the value in a database?
>
Yes. First I'm converting data with URLEncoder, then store it in 
database. So database stores only normal characters and digts 
[0-9%a-zA-Z+*&]
Its not a problem with database. When I'm using Tomcat 5.0.1 (its 
unstable :[ ) with encoding filter or  Resin <web-app id='/' 
character-encoding='utf-8'> evertyhing is OK.

>
>cu,
>	boris
>  
>




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with character encoding.

Posted by Boris Folgmann <mi...@folgmann.com>.
Mariusz Wiktorczyk schrieb:

> I have small web app with text fields (Struts <html:text/>). When user 
> types some strange character from UTF-8
> (see http://fanthom.math.put.poznan.pl/~kosmat/problem/source.jpg)
> the output is different.

Do you store the value in a database?

cu,
	boris
-- 
Dipl.-Inf. Boris Folgmann   mailto:boris@folgmann.de
Folgmann IT-Consulting      http://www.folgmann.de


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org