Pycharm设置utf-8自动显示方法

如下所示:

File->Setting->Editor->File and Code Templates->python script,右侧框框内输入: # -*- coding:utf-8 -*-  ,然后重新启动Pycharm,这样每个新建的Python文件行首都会显示 # -*- coding:utf-8 -*-

相关推荐