Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 155934 - Allow loading/saving of UTF-8 encoded property files
Allow loading/saving of UTF-8 encoded property files
Status: RESOLVED DUPLICATE of bug 75906
Product: utilities
Classification: Unclassified
Component: Properties
6.x
All All
: P3 with 1 vote (vote)
: TBD
Assigned To: issues@utilities
issues@utilities
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-22 13:32 UTC by akochnev
Modified: 2010-07-07 22:09 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

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.
http://dirk.net/2008/12/11/utf-8-encoding-in-netbeans-editor-on-linux/ ,
http://ditoinfo.wordpress.com/2007/02/26/netbeans-and-utf8-encoding-2/), 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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo