Solve the Problem of garbled characters in sublime text 2

Source: Internet
Author: User
Tags sublime text

To solve the problem, make sublime text 2 support gb2312 and GBK. The procedure is as follows:
1. Install sublime package control.
Use Ctrl + ~ On sublime text 2 ~ Open the console and enter the followingCode, Sublime text 2 will automatically install package control.

Import urllib2, OS; pF = 'package control. sublime-package '; IPP = sublime. installed_packages_path (); OS. makedirs (IPP) if not OS. path. exists (IPP) else none; urllib2.install _ opener ( _ opener (urllib2.proxyhandler (); open (OS. path. join (iPP, PF), 'wb '). write (urllib2.urlopen ('HTTP: //'{pf.replace ('', '% 20 ')). read (); print ('Please restart sublime text to finish installation ')

2. Restart sublime text 2

3. Press Ctrl + Shift + P to open the command line mode, and enter install package to search for the required package.

4. Generally, "converttoutf8" and "GBK encoding support" are used to read and write files in CJK format.


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: 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.