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

[BUG] hok cat 在中文环境下显示中文字符乱码 #14

Closed
xrgzs opened this issue Oct 7, 2024 · 1 comment · Fixed by #12
Closed

[BUG] hok cat 在中文环境下显示中文字符乱码 #14

xrgzs opened this issue Oct 7, 2024 · 1 comment · Fixed by #12
Labels
bug Something isn't working

Comments

@xrgzs
Copy link

xrgzs commented Oct 7, 2024

使用 hok cat 在中文环境下显示中文字符会出现乱码的现象

CMD 下测试:

更换 PowerShell 也一样:

使用 scoop cat 不会乱码:

手动使用 chcp 65001 切换代码页为 65001 (UTF-8) 后显示正常

使用 hok info 没有出现乱码的现象

chawyehsu added a commit that referenced this issue Oct 8, 2024
address: #14

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@chawyehsu
Copy link
Owner

hok cat 在没检查到 bat.exe 时会用控制台的 type 指令打印信息,type 的输出受控制台编码影响。我已经去掉 type 改用内置方法打印信息,发版之前你可以安装 bat,这样 hok 会自动用 bat 来打印。

@chawyehsu chawyehsu added the bug Something isn't working label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants