1.pycharm切换编码 方式1: File-Settings…-File Encodings 方式2: 右下角 但是,如果你文件已经指定了编码 # -- coding: UTF-8 --,这里就不能修改了: