Sublime Text 2 Chinese display garbled problem solution

Source: Internet
Author: User
Tags sublime text

Sublime Text 2 is a good cross-platform code editor. However, people are crazy about garbled text on English mac platforms. It took more than a year to use sublime Text, now, let's take a look at the official documents and plug-ins and find a solution. To solve the problem, make Sublime Text 2 support GB2312 and GBK. The procedure is as follows:
1. Install Sublime Package Control.
Use Command + ~ on Sublime Text 2 ~ (Use ctrl + ~ in windows ~) Open the console and enter the following code in it. 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 (urllib2.build _ opener (urllib2.ProxyHandler (); open (OS. path. join (ipp, pf), 'WB '). write (urllib2.urlopen ('http: // sublime.wbond.net/'{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: 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.