Java OpenResty Spring Spring Boot MySQL Redis MongoDB PostgreSQL Linux Android Nginx 面试 小程序 Arthas JVM AQS juc Kubernetes Docker 诊断工具


Windows 使用 chcp 修改 PowerShell、cmd 编码

chcp cmd PowerShell 大约 560 字

说明

PowerShellcmd默认编码跟随系统,很有可能不是UTF-8编码。

CHCP

Changes the active console code page. If used without parameters, chcp displays the number of the active console code page.

微软文档:CHCP

百度百科:CHCP

使用

显示当前编码

chcp

输出:(936代表简体中文)

Active code page: 936

修改为UTF-8编码

chcp 65001

输出:(在当前PowerShellcmd中有效)

Active code page: 65001

对应编码

编码 对应语言
65001 UTF-8
1258 越南语
1257 波罗的语
1256 阿拉伯语
1255 希伯来语
1254 土耳其语
1253 希腊语
1252 拉丁 1 字符 (ANSI)
1251 西里尔语
1250 中欧语言
950 繁体中文
949 朝鲜语
936 简体中文
932 日语
874 泰国语
850 多语种 (MS-DOS Latin1)
437 MS-DOS 美国英语
阅读 5743 · 发布于 2019-08-14

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb

扫描下方二维码关注公众号和小程序↓↓↓

扫描二维码关注我
昵称:
随便看看 换一批