duoduobingbing opened a new issue, #4261:
URL: https://github.com/apache/netbeans/issues/4261

   ### Apache NetBeans version
   
   Apache NetBeans 14
   
   ### What happened
   
   * Have `-J-Dfile.encoding=utf-8` inside the `netbeans_default_options` under 
`{INSTALLDIR}/netbeans/etc/netbeans.conf`
   * Create a new Maven Project
   * Have it print something like
     ```
     System.out.println("%s, %s".formatted(System.getProperty("file.encoding"), 
Charset.defaultCharset()));
     System.out.println("✨✨✨");
     ```
   * Add `-Dfile.encoding=utf-8` to `exec.vmArgs` inside the project's 
`nbactions.xml` for the *Run* action 
   * Run
   * Instead of the expected '✨✨✨' or Tofu Boxes it spits out:
     ```
     utf-8, UTF-8
     ✨✨✨
     ```
   
   ### How to reproduce
   
   Probably is a Windows only problem, as the Output window seems to just use 
the Windows default encoding, which in my case is WIN1252 and ignore the 
encoding that has been set JVM-wide.
   
   Interpreting ✨✨✨ as WIN1252 instead of UTF-8 yields the mangled output 
'✨✨✨' which I got.
   
   Having `JAVA_TOOL_OPTIONS=-Dfile.encoding=utf-8` and 
`MAVEN_OPTS=-Dfile.encoding=utf-8` set as system variables under 
`HKCU\Environment` also does not fix the problem.
   
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 13
   
   ### Operating System
   
   Windows 10
   
   ### JDK
   
   17.0.3 (Eclipse Adoptium Temurin)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   This does work in Netbeans 13 and before, so this bug was introduced in 
Netbeans 14.
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


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