Sublime Text 3 Chinese garbled solution and installation package Manager method

Source: Internet
Author: User
Tags sublime text



Generally garbled because the text is in the GBK encoding format, Sublime text does not support GBK encoding by default.


Install Package Manager Simple Installation


To use CTRL + ' shortcut keys or open the command line from the View->show console menu, paste the following code:


 
import urllib.request,os; 
pf = ‘Package Control.sublime-package’;
 ipp = sublime.installed_packages_path(); 
urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); 
open(os.path.join(ipp, pf), ‘wb’).write(urllib.request.urlopen( ‘http://sublime.wbond.net/’ + pf.replace(’ ‘,’%20’)).read())


The same approach applies to Ubuntu



Press the Enter button
Restart Sublime Text, select preference See more packet setting and packet Control


Manual Installation


Simple installation error can try to install manually
2.1 Click Preferences > Browse Packages menu
2.2 Enter the upper directory of the Open directory and then enter the installed packages/directory
2.3 Download Package Control.sublime-package and copy to installed packages/directory (can go to Baidu search official, very simple)
2.4 Restart Sublime Text


Installing the CoverToUTF8 plugin


Press Shift+ctrl+p or click Preference–>packet Control, enter the install package, wait for a while, in the new input box input CoverToUTF8, below will appear the prompt, select Install.



Finished, open GBK encoded text containing Chinese will not appear garbled.


 


Sublime Text 3 Chinese garbled solution and installation package Manager method


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.