I am working on a java project, which needs to incorporate Internationalisation and Localisation. It has been suggested that the locale specific ".properties" (errormessages_ar.properties) that contain UNICODE equivalent of the Arabic text in my case.
My questing is why not use the Arabic text messages rather than their UNICODE equivalent in the "xyz_ar.properties." file? What problems will this cause?
The rules for Properties files include a rule that the file must be encoded in ISO-8859-1. As the API documentation for (the Java 1.4 version of) java.util.Properties says:
When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, 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.
However if you are using Java 5 or later, you can use the XML format for properties, which doesn't have that restriction. The API documentation for java.util.Properties explains that too.