Issue with request.getParameter while reading UTF-8 Characters inServlet using GET method

P

param

Hi All,

This is regarding the issue I am facing while sending UTF-8 characters
using GET method to a servlet directly from browser.
I have done the following settings:
1. Created a CharsetFilter, which sets encoding type for each request
as UTF-8
2. Applied this filter in web.xml before all the requests
3. In my servlet, while writing the response, I have set
response.setContentType to text/html;charset=utf-8

For the above mentioned settings accented characters like
ÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ works
correctly. But Chinese characters, Arabic characters etc does not
work.

How ever if along with above settings, I change the server.xml
settings to have useBodyEncodingForURI="true" OR/AND
URIEncoding="UTF-8" in connector tag, the Chinese & Arabic characters
works fine but now accented characters do not work :(.

I have tried all the combination of the settings mentioned but some
how only one of the above two situations work.

Has anybody come across this problem? Any pointers will be great.

Thanks
Param
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top