Windows 使用 chcp 修改 PowerShell、cmd 编码
chcp cmd PowerShell About 560 words说明
PowerShell或cmd默认编码跟随系统,很有可能不是UTF-8编码。
CHCP
Changes the active console code page. If used without parameters, chcp displays the number of the active console code page.
使用
显示当前编码
chcp
输出:(936代表简体中文)
Active code page: 936
修改为UTF-8编码
chcp 65001
输出:(在当前PowerShell或cmd中有效)
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 美国英语 |
Views: 7,896 · Posted: 2019-08-14
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...