Sublime中文编码问题

1. 改配置

  Preferences->Settings  三个全部加上 "default_encoding": "UTF-8"

  

2. 代码编写

  2.1 file->save with encoding->'utf-8'

  2.2 头部加上:#coding:utf-8

  2.3 赋值中文字符串前加u

  2.4 打印的时候,加 .encode('utf-8')

  

原文地址:https://www.cnblogs.com/wongbingming/p/6826825.html