tonghoil
deepin
2016-11-06 06:54 嗯,我换成深度终端也解决了乱码问题,还有把c/c++源文件放在桌面好像编译和运行不起来,放在其他目录可以,很奇怪...
Reply Like 0 View the author
https://bbs.deepin.org/post/45281
嗯,我换成深度终端也解决了乱码问题,还有把c/c++源文件放在桌面好像编译和运行不起来,放在其他目录可以 ...
现在终端已经不能设置标题了。。没有-t 参数了。。
终端是一款集工作区、多窗口、远程管理、雷神模式等功能的高级终端模拟器。
选项:
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
-v, --version 显示版本信息。
-w, --work-directory 设置终端的启动目录
-e, --execute 在终端中运行⼀个程序
-q, --quake-mode 设置终端以雷神模式启动
-m, --window-mode 设置终端开启的模式 (normal, maximum, fullscreen,
splitscreen)
--keep-open 设置终端显示命令或脚本执行后的结果
-C, --run-script * 在终端中允许脚本字符串
Popular Ranking
ChangePopular Events
More
由于 Code::Blocks 使用默认的 xterm 做为终端,在 deepin 中安装完 Code::Blocks,在确保源码的格式为 UTF-8 且 Code::Blocks 中的配置 Settings -> Editor... -> General Settings -> Encoding settings 也是 UTF-8 后,编译后一般也还会出现部分中文乱码的问题。
目前的采用的解决方法是,将终端换成深度的终端:在 Code::Blocks 中配置 Settings -> Evironment Settings -> General Settings -> Terminal to launch console programs 为:
deepin-terminal -t $TITLE -x
在 Code::Blocks 中按 F9 就可以在深度的终端中显示正常的中文结果。
当然,在源码格式为GBK(Windows-936)时,可以考虑在 Code::Blocks 中配置 Settings -> Compiler... -> Global compiler settings -> Compiler settings -> Other compiler options 添加参数:
-finput-charset=GBK
-fexec-charset=UTF-8
避免大量修改源码。