JDK-6204853 : (rb) Provide UTF-8 based properties resource bundles
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.4.2,5.0,6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_9,windows_xp
  • CPU: generic,x86,sparc
  • Submitted: 2004-12-07
  • Updated: 2017-05-16
  • Resolved: 2006-04-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b81Fixed
Related Reports
Duplicate :  
Relates :  
Description
The J2SE platform should provide a properties file format as well as a resource bundle lookup strategry based on plain UTF-8.

The platform has for a long time provided a properties file format that is based on ISO-8859-1 and provides an escape mechanism for characters that cannot be represented in this encoding. This format is supported by the standard resource bundle lookup. But, as expressed in the descriptions of RFE's 4749531, 4503634 and others, it's hard to use because it requires continuous conversion back and forth between its escape sequences and character encodings that are actually editable.

Since 5.0, the platform has also provided an XML-based properties file format. This format does allow any character encoding to be used. However, XML files are harder to edit (especially for localizers), they take significantly longer to parse, and the format is currently not supported by the resource bundle lookup.

A plain UTF-8 properties file format that's supported by the resource bundle lookup strategry would make properties resource bundles far more useful.

To distinguish between UTF-8 properties files and ISO-8859-1 properties files, a different file suffix can be used. The syntax of the files can be simplified and sanitized from the ISO-8859-1 version because escape sequences are not needed.
###@###.### 2004-12-07 01:38:58 GMT

Comments
EVALUATION Providing a new constructor, which takes a Reader instance. The caller can supply it constructed from a property file in any encoding, including UTF-8.
29-03-2006

EVALUATION Probably we need the system wide support of UTF-8-based properties rather than just in ResourceBundle. See 4919638. ###@###.### 2004-12-14 03:21:40 GMT
07-12-2004