You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by idan amshalom <id...@yahoo.com> on 2006/02/27 11:10:53 UTC

tomcat 5.5.12 character encoding in server side is allways iso8895-1

hi.
I have a problem of encoding in server side (in the bean) .I want to pass values to the bean in utf-8 and not in iso-8895-1 , I read about this problem and tried everything that was suggested.
I work with tomcat 5.5.12 on windows Server 2003 .  with java 1.5.0.2 

at my top of the jsp I have :
<%@ page pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
also I have these lines:
request.setCharacterEncoding("utf-8");
 response.setContentType("text/html;charset=UTF-8");
   
  I want to set a property in my bean and then to get this value and display it but I have encoding problem probably in the point of passing the value to the bean.
it works when I used this  line in the set function in the bean  :
new String(iInputStr.getBytes("ISO-8859-1"),"UTF-8");
  
this way,I get my String back in the jsp in the right encoding(UTF-8),but I don't understand why I need this line if I used the other lines in the jsp  .

I manage to display hard coded Hebrew characters with utf-8 in my page and also to get the value of a request parameter in utf-8 .
   
   
  I attached the jsp and the bean source
  thanks,
  Idan


		
---------------------------------
 Yahoo! Mail
 Use Photomail to share photos without annoying attachments.

Re: tomcat 5.5.12 character encoding in server side is allways iso8895-1

Posted by Mark Thomas <ma...@apache.org>.
What setting do you have for URIEncoding (see
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html) in your
connector?

Mark


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