Sublime Text 2 Chinese garbled solution

Source: Internet
Author: User
Tags sublime text



Reference Link: http://blog.csdn.net/qq122261257/article/details/8585285



Http://download.csdn.net/detail/yihaiyiren/5758681#comment



http://shanyongbo2012.iteye.com/blog/1847325



1. Install Sublime package Control.
Open the console with ctrl+~ on Sublime text 2 and enter the following code in it, Sublime text 2 will automatically install the package control.


ImportUrllib2,os; pf='Package Control.sublime-package'; Ipp=sublime.installed_packages_path (); Os.makedirs (IPP)if notOs.path.exists (IPP)ElseNone; 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('Restart Sublime Text to finish installation')





2. Restart Sublime Text 2



3. Then use Ctrl+shift+p to open the command line mode and enter the install package inside to search for the required package.



4. "ConvertToUTF8" and "GBK Encoding support" are generally used to read and write files in CJK format normally.






Manual Installation


Manual installation is required if sublime text 2 is installed in a Chinese-language path, or if the%username% of the system path contains the characters.
    1. To install Sublime package Control First, you can try the installation method above and then check if the installation was successful. The check method is simple: 1) Open Sublime Text 2, select the Preferences menu, and select Browse Packages ... 2) The system will open the Packages folder of the sublime Text 2, go back to the previous menu, and open the installed Packages folder 3) If the folder has a package The Control.sublime-package file indicates that the installation was successful.
    2. Otherwise you'll need to manually install the sublime package Control, and it's simple: Download the Control.sublime-package (Baidu) and copy the downloaded files to the installed Packages folder.
    3. Manual Installation Type Conversion package: for example "ConvertToUTF8" or "GBK Encoding support" from the online next, copied to the sublime Text 2 packages directory can be.
    4. Restart Sublime Text 2.





The first installation was unsuccessful, and I was using the second method of



Unzip the download file to get ConvertToUTF8 .... Copy ConvertToUTF8 to C:\Users\ user name \appdata\roaming\sublime text 3\packages directory start Sublime text 3, open garbled file Press Ctrl+shift+c (http ://download.csdn.net/detail/yihaiyiren/5758681#comment)



Sublime Text 2 Chinese garbled 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.