This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155934 - Allow loading/saving of UTF-8 encoded property files
Summary: Allow loading/saving of UTF-8 encoded property files
Status: RESOLVED DUPLICATE of bug 75906
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@utilities
Depends on:
Reported: 2008-12-22 13:32 UTC by akochnev
Modified: 2010-07-07 22:09 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description akochnev 2008-12-22 13:32:54 UTC
Currently (per property file specification) property files are loaded and stored in ISO-8859-1 encoding (disregarding
the encoding specified for the project. As a result, editing a UTF-8 property file (and saving it as such) becomes
unnecessarily difficult: I  have to rename the file to .txt, edit it as a text file, edit it, save it and then rename it
back to .properties file . THe alternative is to use another editor (e.g. vi) to edit this property file. 

There seem to be well known workarounds for this issue (e.g. ,, but they don't seem to apply to property files. 

The specific use case for this is that I was trying to contribute a localization patch to Tapestry 5, which incidentally
uses UTF-8 encoded property files.
Comment 1 Jesse Glick 2010-07-07 18:08:25 UTC
ISO-8859-1 is the standard encoding for properties files since the beginning of Java; other characters must be escaped. There is an open RFE to detect other encodings, but it cannot be reliable since the file itself does not specify its encoding.

*** This bug has been marked as a duplicate of bug 75906 ***
Comment 2 akochnev 2010-07-07 22:09:14 UTC
I guess the idea here was not to change the default encoding for property files - as you mention, by the default encoding is already specified. 

The idea here is to be able to change the encoding, if for whatever reason, I needed a property file saved in an encoding that's not the default.