Cyrllic characters getting converted to special characters.

I am facing a problem when cyrillic character is being sent from JSP to servlet ,its getting converted into some other special character.I am using request.setCharacterEncoding("UTF-8") on servlet.And on jsp I am using <%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>.I am facing this problem both in JBoss and Websphere application server.

Please help me in solving this problem.

[420 byte] By [Jguya] at [2007-11-26 16:49:26]
# 1
How do you send the characters - using POST?Can you post the code in your servlet that you use to retrieve and display the Cyrillic characters in question?And finally, can you post an example of a Cyrillic string and the corresponding incorrect string you see in the servlet?
one_danea at 2007-7-8 23:16:58 > top of Java-index,Desktop,I18N...
# 2

How do you send the characters - using POST?

I have tried both ie get and post.....

Can you post the code in your servlet that you use to retrieve and display the Cyrillic characters in question?

Just using request.getParameter() to get the value...It is showing question marks ie ?

And finally, can you post an example of a Cyrillic string and the corresponding incorrect string you see in the servlet?

Can post cyrllic characters here...:-) But I am giving normal characters only...

It started working in websphere when I changed the jvm settiings ie I gave encoding scheme to jvm also.But still it is not working for JBoss4.0.2.

Any help will be highly appreciated.

Jguya at 2007-7-8 23:16:58 > top of Java-index,Desktop,I18N...
# 3

If it is showing question marks, why did you say originally that the Cyrillic characters were converted to 'special characters'? There's a big difference.

In any case, since changing the JVM settings fixed WebSphere it indicates that you are defaulting to using 8859-1 somewhere.

I assume that you have checked all the potential issues mnetioned here: http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/

one_danea at 2007-7-8 23:16:58 > top of Java-index,Desktop,I18N...
# 4

Thanks for your reply..

But I am not using 8859-1 in my application.I am using UTF-8.I am putting UTF-8 in session and acessing it through out my application.I am getting question marks on jsp page not special characters.

I have read the document which you mentioned and found out whatever they are saying I am doing exactly the same.Only diffrence is they are saying to put in context I am putting in session.

Your help will be highly appreciated.

Jguya at 2007-7-8 23:16:58 > top of Java-index,Desktop,I18N...