matthiasblaesing commented on issue #4259: URL: https://github.com/apache/netbeans/issues/4259#issuecomment-6199854397
@hbitteur your issue is totally different from the issue this is created from. The behavior in properties is not a bug, its a feature (yeah I wanted to say this). NetBeans supports property files as described here: https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.InputStream-: > The input stream is in a simple line-oriented format as specified in [load(Reader)](https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.Reader-) and is assumed to use the ISO 8859-1 character encoding; that is each byte is one Latin1 character. Characters not in Latin1, and certain special characters, are represented in keys and elements using Unicode escapes as defined in section 3.3 of The Java™ Language Specification. This predates UTF-8 encoded property files by about 20 years. The latter were introduced with JDK 9. The NetBeans support made is very simple to edit these files properly without needing built-time magic. Fast forward 20 years and now the feature looks broken, because people don't even know what a pain property files were. You can switch the handling of property files per file: 1. Ensure the property file you want to modify is closed 2. Open the "Properties" window (Window -> IDE Tools -> Properties) 3. Select (don't open!) the file in the Projects/Files/Favorites Tab 4. In the Properties windows you'll se something like this:<br /><img width="535" height="208" alt="Image" src="https://github.com/user-attachments/assets/d48b2a9f-cf78-4ff6-a119-f69378e9a0da" /> 5. The crucial part is the last entry. When that is not checked you get this picture (Notice the non-ascii characters being escaped)<br /><img width="502" height="256" alt="Image" src="https://github.com/user-attachments/assets/2bf2c177-0795-45f9-8978-ec87a0278f44" /> 6. With it checked you get this (my terminal is UTF-8):<br /><img width="502" height="256" alt="Image" src="https://github.com/user-attachments/assets/8c74b951-0ac8-4865-8b10-60a4b4ac8ce4" /> Yes a global option to switch the default would be nice, but this might be the workaround you are looking for. -- 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
