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.
Joined: Nov 08, 2007
UNICODE is the encoding (as opposed to ASCII, for example).
Arabic (as opposed to Cyrillic, for example) is a human script.
Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);