My application uses Labels for internationalization.
In all pages, the accented characters are shown as unicodes. E.g.,
à ---> \u00E0
I have no idea which can be the problem and I can't find any useful documentation on this topic: I only found http://forum.zkoss.org/question/14643/internationalization-accent-characters/?answer=101862#post-id-101862 but all the suggested links are dead.
Properties file are edited with Eclipse ResourceBundle Editor which saves accented letters as unicode: I don't know why the accented characters are rendered as \uXXXX.
Thanks in advance for the collaboration.
At the end I solved the problem.
IT IS ONLY A PROBLEM OF ENCODING, as chillworld and others in other fora said (thanks for driving me on the right way!).
I had to implement multiple tricks to have my application working correctly:
rename .properties
files to .labels
: this is because Eclipse assumes that all properties files are ISO-8859-1 encoded and if you want to be sure that it preserves your encoding you have to rename it. Most important, be sure that the files are UTF-8 encoded (right click in Eclipse on the file, click on 'Properties', encoding is in the last line). To modify the encoding you can use an external editor (SublimeText, UltraEdit, Geany, gedit,...) or within Eclipse go to Edit->Set Encoding
and choose UTF-8.
avoid using the ResourceBundle Editor eclipse plugin or other properties editors (like JBoss Properties Editor): the problem is that they automatically convert accented letters to escaped unicode sequences because they assumes that the properties files are ISO-8859-1 encoded.
replace all the occurrences of the unicode sequences with the corresponding character (e.g., replace \u00E0
with à
, and so on...).
finally, restart Tomcat: it should work.