Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Terminal 和 cmd 中文乱码 #33

Closed
seryte opened this issue Jun 16, 2022 · 11 comments
Closed

Windows Terminal 和 cmd 中文乱码 #33

seryte opened this issue Jun 16, 2022 · 11 comments

Comments

@seryte
Copy link

seryte commented Jun 16, 2022

image

@pengpan
Copy link
Owner

pengpan commented Jun 16, 2022

@seryte
Copy link
Author

seryte commented Jun 16, 2022

ref: windows终端中文乱码如何解决

抱歉, 没有认真读readme, 感谢

@seryte
Copy link
Author

seryte commented Jun 16, 2022

ref: windows终端中文乱码如何解决
这个Dfile也是个jar吗, 要下载吗

image

@pengpan
Copy link
Owner

pengpan commented Jun 16, 2022

ref: windows终端中文乱码如何解决

这个Dfile也是个jar吗, 要下载吗

image

不用

@pengpan
Copy link
Owner

pengpan commented Jun 16, 2022

ref: windows终端中文乱码如何解决

这个Dfile也是个jar吗, 要下载吗

image

不用

不要用powershell,用cmd

@seryte
Copy link
Author

seryte commented Jun 16, 2022

ref: windows终端中文乱码如何解决

这个Dfile也是个jar吗, 要下载吗

image

不用

那这个咋回事呢

@seryte
Copy link
Author

seryte commented Jun 16, 2022

ref: windows终端中文乱码如何解决

这个Dfile也是个jar吗, 要下载吗
image

不用

不要用powershell,用cmd

cmd 也是乱码, 而且进行了这个配置, 看是去是stdout本身不支持utf-8

Unable to get Charset 'cp65001' for property 'sun.stdout.encoding', using default GBK and continuing.
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Unable to get Charset 'cp65001' for property 'sun.stdout.encoding', using default GBK and continuing.

image

@seryte seryte changed the title Windows Terminal 中文乱码 Windows Terminal 和 cmd 中文乱码 Jun 16, 2022
@pengpan
Copy link
Owner

pengpan commented Jun 16, 2022

不用参考vscode配置,直接在cmd操作

  1. 打开 cmd
  2. 执行 chcp 65001
  3. 执行 java -Dfile.encoding=utf-8 -jar 91160-cli.jar init|register
Active code page: 65001

C:\Users\XXX\Desktop\91160-cli-1.1.1>java -Dfile.encoding=utf-8 -jar 91160-cli.jar init
Unable to get Charset 'cp65001' for property 'sun.stdout.encoding', using default UTF-8 and continuing.
请输入用户名: xxx
请输入密码:
2022-06-16 14:22:43.053  INFO : 登录中,请稍等...
2022-06-16 14:22:43.618  INFO : --> GET https://user.91160.com/login.html

@pengpan
Copy link
Owner

pengpan commented Jun 16, 2022

如果还是不行,换台电脑试试

@seryte
Copy link
Author

seryte commented Jun 16, 2022

不用参考vscode配置,直接在cmd操作

  1. 打开 cmd
  2. 执行 chcp 65001
  3. 执行 java -Dfile.encoding=utf-8 -jar 91160-cli.jar init|register
Active code page: 65001

C:\Users\XXX\Desktop\91160-cli-1.1.1>java -Dfile.encoding=utf-8 -jar 91160-cli.jar init
Unable to get Charset 'cp65001' for property 'sun.stdout.encoding', using default UTF-8 and continuing.
请输入用户名: xxx
请输入密码:
2022-06-16 14:22:43.053  INFO : 登录中,请稍等...
2022-06-16 14:22:43.618  INFO : --> GET https://user.91160.com/login.html

感谢大佬, 这样可以了,实际还可以通过日志来看输出, 不是乱码

@pengpan
Copy link
Owner

pengpan commented Jun 16, 2022

对的,也可以通过日志文件查看

@pengpan pengpan closed this as completed Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants