JDK-4749531 : Enable user editable properties files in other encodings
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2002-09-18
  • Updated: 2017-05-16
  • Resolved: 2003-08-15
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.
Other
5.0 tigerFixed
Related Reports
Relates :  
Relates :  
Description

Name: nt126004			Date: 09/18/2002


FULL PRODUCT VERSION :
java version "1.4.1-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b19)
Java HotSpot(TM) Client VM (build 1.4.1-rc-b19, mixed mode)


FULL OPERATING SYSTEM VERSION :

OS independent RFE



A DESCRIPTION OF THE PROBLEM :
I'm going to try this one more time, and hopefully someone
will actually give it a few seconds of thought before
closing it as "Will not fix".

Please reevaluate bug 4503634, which was summarily closed
without being adequately addressed.

  To reiterate my request:  I need a way to include
internationalized messages in Java programs for display to
the enduser.  Internationalized properties files are a pain
in the butt to deal with due to the bizarre \uxxxx encoding,
and there's no reason for such a commonly-needed thing to be
a pain in the butt.

The evaluator said that the Properties class was "legacy",
phased out in favor of Preferences.  Just so there's no
confusion:  we have been using Preferences since it was
first released.  However, the Preferences API does not
replace all usages of Properties, such as in conjunction
with PropertyResourceBundle.  So we continue to use
properties files to store I18N messages.  And it continues
to be a pain in the butt to deal with international
characters, because we're stuck with the default encoding.
I would love to be able to use UTF-8 for all of the files,
but we don't have the option (short of implementing weird
hacks).

I can accept an evaluation of "not worth the effort, deal
with it" (although I'd be happy to make the changes myself
in such a case).  But I cannot accept an evaluation of
"Properties is a legacy API" unless you point me to APIs
which replace all usages of said class, and Preferences
isn't enough to do that.

I simply don't see the relation between the two.  Yes, properties files 
can be used to store user preferences, and that specific usage of them 
is (quite rightly) deprecated in favor of Preferences, but properties 
files are also, and far more frequently, used to store static 
information such as defaults and messages.  Every Java program I have 
ever worked on, whether written by me or by others, does this, and I 
have never once seen Preferences used for that purpose.

I just ran a count -- the JDK itself contains two hundred and fifty 
static properties files.  Most of them are used to store 
internationalized text, which is exactly what everybody else is doing 
with properties files.  Unless you are suggesting that Sun itself is 
doing the wrong thing by using properties files for this purpose, I fail 
to see how Preferences is any more relevant to my request than, say, 
SecurityManager.

I would also point out that this RFE has been requested *over and over* 
in the past.  This is a very simple change.  I am certainly not the only 
person who is baffled why it is so complicated to fix this.  Again, I'd 
be more than happy to fix the stupid class myself, if someone would only 
include the change.

Of course, every prior request for this has also been closed as Will Not 
Fix, so I'm not sure why I still hold out hope.

REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 164261) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b16
14-06-2004

EVALUATION This issue can be re-examined for Tiger. Unfortunately allowing other encodings will require us to adopt a backward compatible means of identifying the encoding of the properties file. ###@###.### 2002-10-02 We will propose new Property load and save methods that use XML format for Tiger. This should allow properties files to be easily editable in other encodings. ###@###.### 2002-10-10
10-10-2002