duoduobingbing commented on PR #4321: URL: https://github.com/apache/netbeans/pull/4321#issuecomment-1173155420
> CMD is the the command line on windows (open the start menu and enter cmd) I know what the term 'cmd' means. It was just that your statement was ambiguous. > So does your programm output correctly when run in CMD? I use Windows Terminal as a wrapper for CMD and Powershell but lets not sweat about the details. Does it output correctly? Yes. Running with Powershell 5 (the legacy powershell, instead of 7) or CMD you have to change the codepage to 65001 (UTF-8) first, but, yes then it works. (This works via `chcp 65001`) To answer a potential question about this: No, changing the codepage does not change the output of `native.encoding` when running Java in cmd or powershell with a changed codepage. As I have stated: Having UTF-8 output under Windows was working prior to your [PR#3836](https://github.com/apache/netbeans/pull/3836) in Netbeans 13 and now it does not. The reason why has already been stated by me. A lot of people have changed their Netbeans to UTF-8 via `-Dfile.encoding=utf-8`. Just do a Google search for `netbeans windows utf-8`. You will see a lot of results. > somewhere my assumptions are broken That is indeed the case. Here is the way it works on Windows: Windows defaults to a windows codepage, but that is just a default. It does not necessarily reflect the encoding of the terminal. Updating the Terminal codepage does not change the value of `native.encoding` or `sun.jnu.encoding`. This requires the Windows user to set each application to UTF-8 seperately. JDK18 goal is to fix this on the Java side, by having `file.encoding` default to `UTF-8`. > instead fix your programm There is nothing to fix. The program outputs UTF-8 as it should, and Windows can handle this just fine. It worked prior to your PR in Netbeans, now it does not. -- 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
