This stems in the fact that java.util.Properties.load(InputStream)
uses ISO-8859-1.
The load(InputStream) / store(OutputStream, String) methods work the same way as the load(Reader)/store(Writer, String) pair, except the input/output stream is encoded in ISO 8859-1 character encoding. Characters that cannot be directly represented in this encoding can be written using Unicode escapes ; only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings.
It has been a problem for ages. I've solved it with struts by implementing custom tags that make encoding transformations, but it is generally a pain.
Java 6 introduces the Properties.load(Writer)
, which works fine with UTF-8, but it seems it isn't widely adopted yet.
I'd suggest using AnyEdit tools to convert to and from the unicode notation.
As for the end-users - if they are to edit properties files (which sounds strange), then you can let them write in whatever characters they like and later convert the files using native2acii (or a wrapper of it)