博客
关于我
解决cmd输出中文乱码的问题
阅读量:365 次
发布时间:2019-03-04

本文共 370 字,大约阅读时间需要 1 分钟。

批处理文件中文乱码解决方法

在使用批处理文件时,遇到中文乱码问题时,可以通过以下两种方式解决。

第一种方法是使用chcp命令。chcp是命令提示符下的字符集处理程序,可以设置不同的代码页来解决字符编码问题。国际通用编码UTF-8对应的代码页编号是65001。通过在批处理文件中添加chcp 65001命令,可以确保命令提示符使用正确的编码显示中文。

第二种方法是通过注册表添加系统变量。这种方法虽然不需要每次都在命令中手动添加编码设置,但存在一个缺点:如果你对英语不熟练,可能会遇到一些操作上的困难。在注册表中找到相应的位置,添加一个字符串值,填写UTF-8编码参数即可。这种方法会使得命令提示符默认显示英文字符,但由于我们习惯使用中文,所以更推荐使用第一种方法。

选择哪种方法取决于你的具体需求。如果你更注重操作简便,建议选择第一种方法。

转载地址:http://jsph.baihongyu.com/

你可能感兴趣的文章
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
查看>>
NO.23 ZenTaoPHP目录结构
查看>>
NO32 网络层次及OSI7层模型--TCP三次握手四次断开--子网划分
查看>>
NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
查看>>
Node JS: < 一> 初识Node JS
查看>>
Node-RED中使用JSON数据建立web网站
查看>>
Node-RED中使用json节点解析JSON数据
查看>>
Node-RED中使用node-random节点来实现随机数在折线图中显示
查看>>