-
Notifications
You must be signed in to change notification settings - Fork 335
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 下使用出现中文乱码 #135
Comments
依然乱码
|
换一个旧版试一下,旧版会出现这种情况吗 |
已经确定在历史版本中也出现此问题 |
可以确定使用 cmd 配合 |
还有一点:powershell下命令不能实时输出,需要等命令结束后才能输出 |
还有就是建议增加gbk环境变量,不需要每次都加上--gbk |
查看一下你使用的 PowerShell 版本: 我测试 v5 版本有这个问题,主要是因为 PowerShell v5 默认使用 Unicode UTF-16LE 编码,并且带有 BOM 这里我的建议是升级到 v6/v7 版本,即可不经任何修改解决该问题(无需使用 gbk 参数,只有cmd需要改参数),v6 版本开始使用 utf8NoBOM 编码方式作为默认输出格式,可以与其它 unix 程序兼容 |
Microsoft Store 搜索 powershell 直接安装即 v7 版本 |
This was referenced Oct 17, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
未加:
已加:
The text was updated successfully, but these errors were encountered: