Saturday, September 24, 2011

Unicode character appear as Question Mark or JSP not Support Language Translation

Nowadays most of the application are supposed to support foreign Language for that we need to create properties file.
In the properties file we translate each and every word and save them using key value pair.
Example file:
languageTranslation_ru.properties
name = имя
password = пароль
submit = представлять
signIn = Войти приложений

Either use Unicode converter or directly place the translated value in your properties file. You set it up correctly and running your application,

Surprisingly you are getting question mark "???" in unicode converted place like below screen shot.
Everything you did correctly, but why its not working. In your jsp page please check whether you included below attribute.
<%@ page contentType="text/html; charset=UTF-8"%>
If not include it and you will get expected output. Check below screen shot for actual result