[ 
https://issues.apache.org/jira/browse/NETBEANS-6298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17462362#comment-17462362
 ] 

luke commented on NETBEANS-6298:
--------------------------------

@[~almson] I tried your code and this is the result (in version 12.6):

If I add the "-J-Dfile.encoding=UTF-8" option to the netbeans.conf file, the 
console output is always garbled, if the netbeans.conf file without the 
"-J-Dfile.encoding=UTF-8" option, regardless of "-J-Dsun.stdout.encoding=UTF-8 
-J-Dsun.stderr.encoding=UTF-8 " option exists or not (netbeans.conf or run VM 
Options), the console output will not be garbled.

Also, opening the properties file (UTF-8 encoding) is always garbled unless I 
set this properties file property separately (Right click properties file > 
propties) and check the "Use project encoding" option. There are two problems 
with this: 1. If I have a lot of propties files, it is bad to set each one; 2. 
If my project encoding is GBK or some other encoding that does not match the 
encoding of the propties file, then I will always get garbled no matter how I 
open the propties file.

> Match NetBeans console encoding to system/app console encoding
> --------------------------------------------------------------
>
>                 Key: NETBEANS-6298
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-6298
>             Project: NetBeans
>          Issue Type: Bug
>          Components: cnd - Editor
>    Affects Versions: 12.0, 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, NB13, 13
>         Environment: Windows 10、JDK1.8.201、Maven3.6.0、Netbeans12.6、Project 
> encoding UTF-8
>            Reporter: luke
>            Priority: Blocker
>         Attachments: Garbled.gif, Garbled.png
>
>
> My Windows OS language is Simplified Chinese and the default OS encoding is 
> GBK. When I open a properties file or a text file, the editor shows the file 
> contents as garbled, if I add the parameter -J-Dfile.encoding=UTF-8, the 
> editor opens the file in UTF-8 encoding format and the file is not garbled, 
> but the console output is garbled.
> !Garbled.gif|width=1055,height=536!
> !Garbled.png|width=1542,height=843!



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to