当前位置:网站首页>CLion-控制台输出中文乱码
CLion-控制台输出中文乱码
2022-07-04 08:46:00 【胡安民】
对于从事软件开发的程序员来说,JetBrains 的全家桶使用起来比较方便。无论是 Android 开发用到的 AndroidStudio,或者是 Web 开发的 WebStorm ,再到 C 语言的 CLion。相同的界面风格,熟悉的快捷键,一切用起来是那么的顺溜。
为了学习 C 语言和数据结构,便选择了 CLion 作为 IDE。某一天我在控制台输出中文时,输出的都是乱码。特此记录下解决办法。
设置编码
- 打开 File —> Settings —> Editor
- 选择 File Encodings
- 将编码设置为 UTF-8
设置完成以后,运行项目发现还是乱码。原因是需要将控制台的编码也更改为 GBK。
到此为止,大功告成。但以上是基于 Windows 系统来说,下面来说下在 Windows 中运行 Ubuntu 中编写的代码,产生的乱码问题。
边栏推荐
- Show server status on Web page (on or off) - PHP
- 根据数字显示中文汉字
- Codeforces Round #793 (Div. 2)(A-D)
- 一文了解數據异常值檢測方法
- System disk expansion in virtual machine
- awk从入门到入土(6)正则匹配
- Group programming ladder race - exercise set l1-006 continuity factor
- [error record] no matching function for call to 'cacheflush' cacheflush();)
- 【无标题】转发最小二乘法
- OpenFeign 服务接口调用
猜你喜欢
The basic syntax of mermaid in typera
How can we make a monthly income of more than 10000? We media people with low income come and have a look
Four essential material websites for we media people to help you easily create popular models
AI Winter Olympics | is the future coming? Enter the entrance of the meta universe - virtual digital human
std::is_ union,std::is_ class,std::integral_ constant
Codeforces Round #803 (Div. 2)(A-D)
SSRF vulnerability exploitation - attack redis
4 small ways to make your Tiktok video clearer
DM8 command line installation and database creation
Bishi blog (13) -- oral arithmetic test app
随机推荐
没有Kubernetes怎么玩Dapr?
User login function: simple but difficult
2022 gas examination registration and free gas examination questions
SSRF vulnerability exploitation - attack redis
How to choose solid state hard disk and mechanical hard disk in computer
L1 regularization and L2 regularization
Codeforces Round #793 (Div. 2)(A-D)
AcWing 244. Enigmatic cow (tree array + binary search)
一文了解数据异常值检测方法
Cancel ctrl+alt+delete when starting up
The right way to capture assertion failures in NUnit - C #
力扣今日题-1200. 最小绝对差
yolov5 xml数据集转换为VOC数据集
FRP intranet penetration, reverse proxy
微服務入門:Gateway網關
SQL statement view SQL Server 2005 version number
Guanghetong's high-performance 4g/5g wireless module solution comprehensively promotes an efficient and low-carbon smart grid
微服务入门:Gateway网关
09 softmax regression + loss function
Go zero micro service practical series (IX. ultimate optimization of seckill performance)