-
1. Re: general question on encoding
przemyslawo Jul 26, 2007 10:40 AM (in response to hasc)I have the same problem with polish characters (????ó???) when I am using them in messages_pl.properties.
My .xhtml files are set to UTF-8 encoding, and polish characters are displayed well.
Only text from messages in some place is converted to: Ä sequence of chars (looks like: Ä :) ) -
2. Re: general question on encoding
wise_guybg Jul 26, 2007 12:14 PM (in response to hasc)I don't think that you should have foreign characters in the xhtml.
As of the properties files... they should be in ISO-8859-1 that's the standard. Any characters >128 (I think) should be encoded like this \uXXXX (I think). All java IDE's contain a plugin that helps you write your properties file in the language you want and have it converted when you deploy. -
3. Re: general question on encoding
przemyslawo Jul 26, 2007 12:32 PM (in response to hasc)Thanks for quick answer.
Do you know how to make such a mapping from non-english characters to \uXXXX in painless way in eclipse?
PS.
It's not so obvious that standard for .properties is ISO-8859-1, when everywhere in java world UTF-8 is a standard.
Especially using ISO-8859-1 in files that are used for internationalization is a little bit strange.
I think that this should be explained in reference documentation Chapter 14. Internationalization and themes. -
4. Re: general question on encoding
wise_guybg Jul 26, 2007 12:38 PM (in response to hasc)You're right that it's not obvious. And given the fact that every IDE needs a plugin for properties files, I think that this is a strange standard. This comes from Java, not Seam.
From another forum:You can't. Java property files are always encoded in ISO-8859-1. In
order to use other characters you need to escape them properly. There
is an encoder/decoder for it and/or eclipse plugin.
http://www.google.bg/search?q=properties+eclipse
Sorry but I don't use Eclipse and I have not found a good way to handle properties files when I was using it. -
5. Re: general question on encoding
wise_guybg Jul 26, 2007 12:41 PM (in response to hasc)You can use ant build with this:
Like all java properties files, the file is encoded in ISO-8859-1; if you need to represent other characters, you will need to use escape sequences. The standard Java programs "native2ascii" or "ascii2native" is the best way to write these secape sequences. Search http://java.sun.com for more information on using these tools.
-
6. Re: general question on encoding
przemyslawo Jul 30, 2007 6:27 AM (in response to hasc)thanks wise_guybg.
I've found many helpfull informations here:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=89832&postdays=0&postorder=asc&start=0