如何让cmd正确显示阿拉伯文字? [英] How to make cmd correctly display arabic script?

查看:36
本文介绍了如何让cmd正确显示阿拉伯文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 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 Console.我知道这很奇怪... 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆