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 114870 - Properties editor messes up unicode escape sequences for the 'space' character in properties files
Summary: Properties editor messes up unicode escape sequences for the 'space' characte...
Status: RESOLVED DUPLICATE of bug 111530
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords:
: 116975 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-06 12:24 UTC by richard_kunze
Modified: 2007-09-28 15:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description richard_kunze 2007-09-06 12:24:16 UTC
The property file editor in Netbeans 6.0M10 converts unicode escape sequences (e.g \u1234) to the corresponding 
characters when loading a file and - if the character in question can't be saved in the files encoding - back to 
escape sequences on save. This is fine in most cases, but in case of the 'space' character (\u0020) this can lead to 
undesired behaviour, because Java treats escaped and unescaped spaces differently when they appear at the start or end 
of a property value: Unencoded leading and trailing spaces are stripped, but leading or trailing spaces explicitly 
encoded as '\u0020' in the properties file become part of the property value. 

This means that editing a property file may unintentionally change the actual content of the property values because 
the property editor converts explicitly coded leading and trailing spaces to unescaped spaces on save.
Comment 1 Peter Pis 2007-09-07 15:56:09 UTC
Reassigning to "properties" for evaluation.
Comment 2 Marian Petras 2007-09-21 22:51:56 UTC
This was fixed together with bug #111530 ("tabs in properties files are saved as "\t" sequences although the translation
is not necessary"). The fix is in development builds of NetBeans 6.0 Beta 2, not in Beta 1. I will attach a binary patch
for Beta 1 to issue #111530.

*** This issue has been marked as a duplicate of 111530 ***
Comment 3 Marian Petras 2007-09-28 15:03:23 UTC
*** Issue 116975 has been marked as a duplicate of this issue. ***