nmatt commented on PR #9748: URL: https://github.com/apache/netbeans/pull/9748#issuecomment-7054350596
@matthiasblaesing @mbien I saw this a bit too late, but I have an objection, or maybe this is a feature wish: > Since JDK 9 ResourceBundle defaults to UTF-8 for reading property files, rendering escape codes useless. Properties files aren't only used for ResourceBundle, hence "rendering escape codes useless" is not true. In particular, `Properties.load(InputStream)` continues to use ISO 8859-1, unconditionally. And since ResourceBundle falls back to ISO 8859-1 on invalid UTF-8, ISO 8859-1 remains the one universally working option. Projects nowadays have their sources in UTF-8 (project encoding) but may continue to keep properties files in ISO 8859-1 when not exclusively using ResourceBundle properties files, and also for compatibility with older properties-file tooling. Furthermore, in collaborative scenarios, and when using other tooling, it can be inconvenient that NetBeans always encodes ISO 8859-1 non-ASCII characters into Unicode escapes (I semi-regularly have Git "fights" converting back and forth with other project members who are using a different IDE). And using UTF-8 (project encoding) is also not universally viable as explained above. Therefore it would be useful to have three (or possibly four) options: 1. ASCII (automatic native2ascii conversion) 2. ISO 8859-1 (no native2ascii conversion) 3. UTF-8 (no native2ascii conversion) 4. project encoding (usually UTF-8) (no native2ascii conversion) Maybe 3 and 4 can be merged into one. On the other hand, maybe someone uses a different project encoding (say, a Japanese encoding) but wants their properties files be in non-escaped UTF-8. What do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
