Sublime text 2/3 [Decode error-output not utf-8] perfect solution

Source: Internet
Author: User

 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
    1. {
    2. " shell_cmd": "ruby \" $file \ "",
    3. " File_regex": "(\\w:...*?):( [0-9]*):? ([0-9]*) ",
    4. " selector": "Source.ruby",
    5. " encoding": "Utf-8",
    6. }

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.