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 244451 - Formatting of unrelated lines changed (Unicode escapes lowercased, ISO-8859-1 escaped)
Summary: Formatting of unrelated lines changed (Unicode escapes lowercased, ISO-8859-1...
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-12 21:13 UTC by Jesse Glick
Modified: 2014-05-12 21:13 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 Jesse Glick 2014-05-12 21:13:01 UTC
If you open a long *.properties file in the editor, change one line, and save it, NetBeans may nonetheless change many other lines:

· \uAB12 is changed to \uab12
· raw ISO-8859-1 (but not ASCII) characters are escaped

For people working in a team with others using other editors, this is unacceptable; only lines which were semantically changed should actually be touched.

I guess PropertiesEncoding.PropCharsetEncoder as called from PropertiesEditorSupport.saveFromKitToStream needs to compare to an existing FileObject so it knows which lines should be left untouched. Or perhaps there is some way to keep invisible document properties in loadFromStreamToKit that remember the literal format used by existing lines. At worst there could be a weak map from StyledDocument to original byte content.