当前位置:网站首页>设置cmd的编码为utf-8
设置cmd的编码为utf-8
2022-06-28 08:06:00 【庸懒】
最近初学数据库,发现不管是插数据还是查数据只要是用到中文的都是乱码,刚开始是很疑惑的因为我的数据库已经设置格式为utf-8,查了半天才知道是因为cmd的编码没改过来,下面我就说一下设置cmd默认格式为utf-8
一、非默认形式
- 首先在控制台输入chcp可以查看当前代码页为936,也可以右键cmd然后点击属性中的选项中查看到。这里因为我已经设置过了所以我用mysql的窗口做演示。

- 直接在cmd输入chcp 65001即可,这时的cmd就设置为utf-8的形式了。但是这种更改仅限本次cmd窗口,如果关闭了cmd再打开你会发现代码页还是936,所以像我这样的懒人就会将utf-8格式改为默认。
二、设置utf-8为默认
1.首先打开运行窗口输入regedit打开注册表编辑器。

2.按以下路径进入到目标项
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
强烈建议大伙直接复制粘贴进入嗷,懒就得懒到底。
3.右键右边区域,点击新建选择字符串值然后新建如下选项
然后点击确定就OK了,这时候你再打开cmd就会发现默认代码页已经变成65001了。
边栏推荐
- Kubernetes theoretical basis
- Generation and verification of JWT token
- 本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
- Redis cluster deployment and application scenarios
- App automated testing appium tutorial 2 - ADB command
- SOC serial port configuration
- [shangpinhui] project notes
- 你了解TCP协议吗(一)?
- MySQL single table access method
- Vagrant installation
猜你喜欢

MySQL row format parsing

你了解TCP協議嗎(二)?

asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...

Ambari (VIII) --- ambari integrated impala document (valid for personal test)

How to configure DDR3 of dm8148

Redis cluster deployment and application scenarios

Introduction to Devops Basics

三角变换公式

Static resource compression reduces bandwidth pressure and increases access speed

2022第六季完美童模 佛山赛区 初赛圆满落幕
随机推荐
Ambari (IX) --- use expect to realize no interaction in ambri server setup phase (valid for personal test)
HJ base conversion
redis02——一篇终结redis的五种数据类型操作命令(可学习、复习、面试、收藏备用)
匿名页的反向映射
图像翻译/Transformer:ITTR: Unpaired Image-to-Image Translation with Transformers用Transfor进行非配对图像对图像的转换
Porting ucosiii to stm32f429
es数据导出csv文件
Co process, asyncio, asynchronous programming
十大券商注册开户靠谱吗?安全吗?
Conversion between HJ integer and IP address
Idea package together, using compact middle packages to solve &
Explanation and application of instr() function in Oracle
Flex layout
Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
你了解TCP协议吗(二)?
asp. Net upload image path and image name
云原生:云计算技术再次升级 开启全面云开发时代
MySQL tablespace parsing
Online WPS tool
2022第六季完美童模 佛山赛区 初赛圆满落幕