hbitteur commented on issue #4259:
URL: https://github.com/apache/netbeans/issues/4259#issuecomment-6193237452

   Today, I have a similar problem with NetBeans 31 on a Gradle project.
   
   1/ For the Java files, UTF-8 characters are correctly handled (typed and 
displayed)
   
   2/ For the resources `.properties` files the story is different.
   I can type an accented letter, it is displayed as such, but saved as a 
unicode string in the file (I checked with hexdump).
   When the file is reloaded, the unicode strings are recognized and displayed 
as accented letter.
   Fine!
   Except for two aspects:
   - If I open the same `.properties` file with another editor, such as Notepad 
or Visual Studio Code, the display presents the unicode string instead of the 
accented letter. This is not convenient at all. We cannot force every 
contributor to our project to use only NetBeans!
   - Still using another editor on a `.properties` file, if I type an accented 
letter, it is saved as a UTF-8 character (I checked again with hexdump). And if 
I now use NetBeans to open the file, these characters are displayed as a pair 
of unreadable rectangular signs. If the file is modified and saved, the file on 
disk is now corrupted!
   
   Regarding my configuration:
   - Netbeans 31 (with embedded Java 26)
   - The `netbeans.conf` file does contain the line: 
netbeans_default_options="-J-Dfile.encoding=UTF-8 etc...
   - Because this is a Gradle project, no "encoding" option appears in the 
NetBeans project properties dialog under the Sources category.
   - Instead, the `build.gradle` files contain:
   ```groovy
   tasks.withType(JavaCompile) {
       options.encoding = 'UTF-8'
   }
   
   tasks.withType(ProcessResources) {
       filteringCharset = 'UTF-8'
   }
   ```
   
   Please help me find a workaround.
   Thanks in advance!


-- 
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

Reply via email to