当前位置:网站首页>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 中编写的代码,产生的乱码问题。
边栏推荐
- 没有Kubernetes怎么玩Dapr?
- Need help resetting PHP counters - PHP
- Newh3c - routing protocol (RIP, OSPF)
- The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
- ES6 summary
- DM8 uses different databases to archive and recover after multiple failures
- Educational Codeforces Round 115 (Rated for Div. 2)
- snipaste 方便的截图软件,可以复制在屏幕上
- Technology sharing | MySQL parallel DDL
- Convert datetime string to datetime - C in the original time zone
猜你喜欢
ctfshow web255 web 256 web257
Fault analysis | MySQL: unique key constraint failure
Newh3c - routing protocol (RIP, OSPF)
The second session of the question swiping and punching activity -- solving the switching problem with recursion as the background (I)
ArcGIS应用(二十二)Arcmap加载激光雷达las格式数据
Collections in Scala
地平线 旭日X3 PI (一)首次开机细节
Turn: excellent managers focus not on mistakes, but on advantages
Educational Codeforces Round 119 (Rated for Div. 2)
std::is_ union,std::is_ class,std::integral_ constant
随机推荐
Educational Codeforces Round 115 (Rated for Div. 2)
Codeforces Round #803 (Div. 2)(A-D)
Ehrlich sieve + Euler sieve + interval sieve
Fault analysis | MySQL: unique key constraint failure
High order phase difference such as smear caused by myopic surgery
yolov5 xml数据集转换为VOC数据集
AcWing 244. Enigmatic cow (tree array + binary search)
awk从入门到入土(11)awk getline函数详解
2022 gas examination registration and free gas examination questions
How to send pictures to the server in the form of file stream through the upload control of antd
Call Baidu map to display the current position
Laravel page load problem connection reset - PHP
Azure ad domain service (II) configure azure file share disk sharing for machines in the domain service
Educational Codeforces Round 115 (Rated for Div. 2)
Webapi interview question summary 01
The basic syntax of mermaid in typera
学习Nuxt.js
FOC control
How to re enable local connection when the network of laptop is disabled
awk从入门到入土(6)正则匹配