当前位置:网站首页>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 中编写的代码,产生的乱码问题。



边栏推荐
- From scratch, use Jenkins to build and publish pipeline pipeline project
- What if the wireless network connection of the laptop is unavailable
- 力扣今日题-1200. 最小绝对差
- SSRF vulnerability exploitation - attack redis
- C#实现一个万物皆可排序的队列
- How to solve the problem that computers often flash
- How can we make a monthly income of more than 10000? We media people with low income come and have a look
- Industry depression has the advantages of industry depression
- The right way to capture assertion failures in NUnit - C #
- Codeforces Round #803 (Div. 2)(A-D)
猜你喜欢

NewH3C——ACL

小程序容器技术与物联网 IoT 可以碰撞出什么样的火花

Codeforces Round #793 (Div. 2)(A-D)

Codeforces Global Round 21(A-E)

How can we make a monthly income of more than 10000? We media people with low income come and have a look

ArcGIS application (XXII) ArcMap loading lidar Las format data

【无标题】转发最小二乘法

Famous blackmail software stops operation and releases decryption keys. Most hospital IOT devices have security vulnerabilities | global network security hotspot on February 14

DM8 tablespace backup and recovery

DM8 command line installation and database creation
随机推荐
awk从入门到入土(8)数组
Const string inside function - C #
Démarrage des microservices: passerelle
@Role of requestparam annotation
Add log file to slim frame - PHP
System disk expansion in virtual machine
awk从入门到入土(18)gawk线上手册
A method for detecting outliers of data
How to get bytes containing null terminators from a string- c#
Codeforces Round #793 (Div. 2)(A-D)
What if I forget the router password
awk从入门到入土(12)awk也可以写脚本,替代shell
HMS core helps baby bus show high-quality children's digital content to global developers
string. Format without decimal places will generate unexpected rounding - C #
Go zero micro service practical series (IX. ultimate optimization of seckill performance)
Show server status on Web page (on or off) - PHP
4 small ways to make your Tiktok video clearer
High order phase difference such as smear caused by myopic surgery
What exactly is DAAS data as a service? Don't be misled by other DAAS concepts
awk从入门到入土(15)awk执行外部命令