-
1. Re: Reading messages from properties file in UTF-8 on JSF 2.0 page
ctomc Jun 30, 2012 5:54 PM (in response to chem_euegene)Hi,
can you verify that your jsp page is UTF-8 encoded.
and you can add -Dfile.encoding=utf-8 to standalone.conf.bat
it should fix your problem
--
tomaz
-
2. Re: Reading messages from properties file in UTF-8 on JSF 2.0 page
sfcoy Jul 1, 2012 4:32 AM (in response to chem_euegene)The encoding of properties files is fixed as ISO-8859-1 and cannot be changed. Unfortunately this means that you must encode your text using unicode escape sequences if you want to continue using .properties format files.
The alternative is to use XML formatted property files where you can set the encoding explicitly.
-
3. Re: Reading messages from properties file in UTF-8 on JSF 2.0 page
chem_euegene Jul 1, 2012 11:03 AM (in response to sfcoy)Stephen, properties file is simple text file and I can encode it as I want. I have successfully been using java.util.Properties class and utf-8 encoded properties file.
Could you present solution with xml properties files for internalization? I always use simple properties files and didn't have problems.
And why it works on OpenShift platform? Over there is also installed Jboss AS.
-
4. Re: Reading messages from properties file in UTF-8 on JSF 2.0 page
chem_euegene Jul 1, 2012 11:23 AM (in response to ctomc)and you can add -Dfile.encoding=utf-8 to standalone.conf.bat
I've already tried this. It didn't help me.
can you verify that your jsp page is UTF-8 encoded.
How I can do it? I notice that I deal with JSF, not jsp page. Other labels on the page are shown correct (those that are obtained from some other bean than Messages). And if I type words in the template.xhtml file - it's all right.
-
5. Re: Reading messages from properties file in UTF-8 on JSF 2.0 page
sfcoy Jul 1, 2012 8:41 PM (in response to chem_euegene)Eugene Ivlev wrote:
Stephen, properties file is simple text file and I can encode it as I want. ...
It is not a simple text file and you cannot encode it how you want. Please read the javadoc for java.util.Properties
-
6. Re: Reading messages from properties file in UTF-8 on JSF 2.0 page
chem_euegene Jul 2, 2012 3:20 AM (in response to sfcoy)Stephen, you have convinced me. Thanks!
I'll try to use xml...