Tag Archives: decode error

Sublime text 3 does not support Chinese/[decode error – output not UTF-8] solution

Baidu in the online solution to others, found that the need for the following two steps can be achieved, but most of the methods are only the first step.

Step 1:

Open packages in the installation folder of sublime text and find the Python.sublime -Package, open with decompression software, modify the files inside Python.sublime -Build, add “encoding”: “cp936”

    {
      "cmd": ["C:/Python33/python.exe", "-u", "$file"],
      "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
      "selector": "source.python",
      "encoding": "cp936"//Add the line, followed by a comma if there is content below
    }

Step 2:

Pythonioencoding is added to the system variable, and UTF-8 is filled in the value

      On the desktop, right-click on Computer and select Properties, select Advanced System Settings, select the Advanced tab, select Environment Variables

      Restart sublime text2.