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

Summary: Formatting of unrelated lines changed (Unicode escapes lowercased, ISO-8859-1 escaped)
Product: utilities Reporter: Jesse Glick <jglick>
Component: PropertiesAssignee: Jan Peska <JPESKA>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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.