如何使cmd正确显示阿拉伯语脚本? [英] How to make cmd correctly display arabic script?
问题描述
我运行Windows 7并使用python脚本输出一些字符串在阿拉伯语到Windows cmd。这是我得到的:
I am running windows 7 and using a python script that outputs some strings in arabic to windows cmd. This is what I get:
如何正确配置cmd显示阿拉伯字符串?
How do I configure cmd show arabic strings correctly?
推荐答案
将您的 cmd
的代码页更改为您输出的编码:
Change your cmd
's code page to the encoding you're outputting:
chcp 1256
1256
Windows的阿拉伯语代码页如果您使用其他编码输出,只需在整个列表中找到它们的代码页,并将 1256
更改为您在命令中所需的标识符。
That 1256
is an Arabic code page for Windows If you're outputting in another encoding, just find them in the whole list of code pages and change 1256
to the identifier you want in the command.
提示:UTF -8是65001
Hint: UTF-8 is 65001
注意:要显示除 ascii
之外的其他字符,Window的 cmd
的当前字体必须在属性中更改为 Lucida控制台
。这是奇怪的我知道... Windows:)
Note: To show other characters than ascii
, Window's cmd
's current font must be changed to Lucida Console
in properties. It's weird I know... Windows :)
希望这有助于!
这篇关于如何使cmd正确显示阿拉伯语脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!