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 239513 - When opening properties files with unicode escapes the editor lowercases them all.
Summary: When opening properties files with unicode escapes the editor lowercases them...
Status: REOPENED
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal with 5 votes (vote)
Assignee: Jan Peska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 09:23 UTC by reyez
Modified: 2017-04-06 10:22 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
File with "uppercase" utf-8 encodings (64 bytes, application/octet-stream)
2013-12-17 09:13 UTC, reyez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description reyez 2013-12-16 09:23:49 UTC
Let's say we have a properties file with the following key:
key=\u00F6zel

If we change something and save the file Netbeans automatically lowercases all Utf8 escapes... after saving we'd get:
key=\u00f6zel

Even if we did not change the UTF-8 escape itself.

This is not really friendly because that means that Netbeans changes parts of files where we did not change anything manually. And that makes merging of language files in larger projects painful. Especially if other members are using other tools.

Maybe there is a way to just keep utf-8 escapes. Either lowercase or uppercase.

Thanks!
Comment 1 Milutin Kristofic 2013-12-16 13:58:51 UTC
Can you attach message.log? Do you use any plugins? 

I tested your case on 
Product Version: NetBeans IDE Dev (Build 20131216-0ec3997865ff)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15
System: Linux version 3.0.0-32-generic running on amd64; UTF-8; en_US (nb)

and I had uppercase after save.
Comment 2 Milutin Kristofic 2013-12-16 14:45:15 UTC
In property file, there is some manipulating with encoding. I am sending to property team for evaluate.
Comment 3 reyez 2013-12-17 09:13:23 UTC
Created attachment 143233 [details]
File with "uppercase" utf-8 encodings
Comment 4 reyez 2013-12-17 09:19:32 UTC
I attached a file that contains the following two lines:
showPartnerSpecificCommissions=Mostrar comiss\u00F5es
all=Tudo 

Please note that we got a "uppercase" utf-8 encoding (\u00F5).


You can reproduce the issue (Netbeans 7.4) in two ways:

1) Open the file via "Edit"
- Change "Tudo" to "Tudo!", save the file and you get a lowercased \u00f5 (lower case "f").

2) Open the file via "Open" (useful for editing many language files at the same time).
- Change "Tudo" to "Tudo!", save the file and you get a lowercased \u00f5 (lower case "f").


I am not the utf-8 escape expert, but I could not find any recommendation whether lower case unicode escapes are better or worse than upper case unicode escapes.

Therefore I'd expect my editor to not change anything I did not change. Because if the Netbeans properties editor does change files in that way it makes diffs in version control systems huge. And this in turn makes it really hard to work in larger teams (that sometimes use different tools to generate those properties files). 

(Apart from it - the i18n properties editor is really great and we are loving to work with it :) )
Comment 5 robyter 2014-02-11 09:58:24 UTC
I reopened this issue because it is still valid and has all the required details.

When saving a file, only the edited lines should be modified.
Comment 6 sentrox 2014-08-15 06:42:31 UTC
I'm currently in a team where some developers (still) use IntelliJ IDEA.
The default of the "Transparent native-to-ascii conversion" feature of IDEA is to convert all native characters to to uppercase unicode escapes, but Netbeans default converts all escapes unicode to lower case, which is a quite unsatisfying situation.

Please make this feature configurable.
Comment 7 ma.schroed 2015-08-20 19:21:21 UTC
I'm working in an evironment, where my colleagues use Eclipse. The merge of properties files is a pain, since NetBean converts the UTF-8 escapes. It would be perfect when upper or lower case can be set in the options dialog.

Thanks!