Category: Other 2014-05-12 09:52 8063 People read Comments (9) favorite reports
Sublime text sometimes runs to output the following error message:
[Decode error-output not utf-8] or [Decode error-output not GBK]
The error message means that the script output information is not a specified encoding.
The specified encoding is generally in xx.sublime-build, such as the contents of Ruby.sublime-build:
[Python]View Plaincopy
- {
- " shell_cmd": "ruby \" $file \ "",
- " File_regex": "(\\w:...*?):( [0-9]*):? ([0-9]*) ",
- " selector": "Source.ruby",
- " encoding": "Utf-8",
- }
Where encoding is the specified encoding, Ruby.sublime-build can be found in the sublime Text 3\packages\ruby.sublime-package.
We can modify the encoding of the output text information by modifying the Ruby.sublime-build.
1. Copy the Ruby.sublime-build file from the Ruby.sublime-package (note: ruby.sublime-package is a zip file, as long as you change the prefix name to zip to open the compressed file)
2. Copy the Ruby.sublime-build to the Data\packages\user\ directory of the sublime text
3. Open this file and modify "encoding": "Utf-8" in this file to "encoding": "GBK"
The above changes have limitations, such as I sometimes output is utf-8, sometimes output is GBK, this time is not.
Sublime text 2/3 [Decode error-output not utf-8] perfect solution