解决:Error: Could not decode "*.cpp" with "UTF-8" - encoding. Editing not possible

解决:Error: Could not decode "*.cpp" with "UTF-8" - encoding. Editing not possible
点击 【select encoding】,如下,如果有 UTF-8,就选择 UTF-8, 没有的话,就选择,System, 然后【按编码重新载入】,就解决了。

如果没有找到uft-8或者system,选中:GBK/windows-936-2000/CP936/MS936/windows-936)
解决:Error: Could not decode "*.cpp" with "UTF-8" - encoding. Editing not possible

tip:

  • 文件从window上传到Ubuntu后会显示乱码,原因是因为ubuntu环境设置默认是utf-8,Windows默认都是GBK.
  • Windows环境下,Qt Creator,菜单->工具->选项->文本编辑器->行为->文件编码:默认编码:System(简体中文windows系统默认指的是GBK编码,即下拉框选项里的GBK/windows-936-2000/CP936/MS936/windows-936)

参考:https://blog.csdn.net/libaineu2004/article/details/19245205