3

While i trying to getting parameter 'تقويمات ESO11 تقويمات 'from jsp to sevlet the value is of the form 'تÙÙÙÙØ§Øª ESO '.I set following in servlet code

  response.setContentType("text/html; charset=UTF-8");
  response.setCharacterEncoding("UTF-8");

and in jsp following settings are made

   <%@ page contentType="text/html; charset=UTF-8" %>
   <%@page pageEncoding="UTF-8"%>
divz
  • 7,847
  • 23
  • 55
  • 78
  • 1
    See http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps – axtavt Dec 22 '11 at 10:05
  • There also exists a **request.setCharacterEncoding("UTF-8");***. The reference of @axtavt treats unbelievable many aspects too. – Joop Eggen Dec 22 '11 at 10:18

1 Answers1

2

If you send this data via HTTP GET you need possibly to adjust the URIEncoding option. If you use apache tomcat you need to configure UTF-8.

see http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

a server.xml example:

<Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true"
               URIEncoding="UTF-8"
   />

If this is not your problem a more detailed post can be found here: How to get UTF-8 working in Java webapps?

Community
  • 1
  • 1
fyr
  • 20,227
  • 7
  • 37
  • 53