Sublime Text 3 Chinese garbled problem solving and correcting on-line method

Source: Internet
Author: User



Environment:



Sublime Text 3008



Win 8.1 64bit






Sublime text is a good editor, these two days download to play the next. But before using the system "notepad" to write files, many open after the Chinese is garbled.



There are many solutions on the internet, basically almost. But if you do it the way you do, you can summarize it in one sentence: it helps, but it doesn't solve the problem at the end.






Finally, a blind touch, the result of a touch through. Now, let's take a look:



1, to solve the garbled problem, need a plug-in ConvertToUTF8. and sublime text is good, is a lot of plug-in Help, it from a simple editor, into a powerful IDE, but also support a variety of software language IDE.



2, to install plug-ins, you need to first make a package control plug-in. The problem is here. Whether it is a Chinese network method, or even according to the official web-based method, there is a problem.



Later found that the Chinese network of solutions, are from the official online translation, so, directly take the official website to see it. below the green is the official website method, the red is my modification:



First, from the menu View-show console or CTRL + ~ shortcut keys, bring up the console. Then, copy the following command to the input box, enter, and wait for it to install itself successfully:



If it is sublime 3, use the following command:


<span style= "color: #009900;" >import Urllib.request,os,hashlib; h = ' eb2297e1a458f27d836c04bb0cbaf282 ' + ' d0e7a3098092775ccb37ca9d6b2e4b7d '; PF = ' package control.sublime-package '; IPP = Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); by = Urllib.request.urlopen (' http://packagecontrol.io/' + pf.replace (', '%20 ')). read (); DH = hashlib.sha256 (by). Hexdigest (); Print (' Error validating download (got%s instead of%s), please try manual install '% (DH, h)) if DH! = H Else Open (Os.pat H.join (IPP, PF), ' WB '). Write (by) </span>

 


If it is sublime 2, use the following command:


<span style= "color: #009900;" >import Urllib2,os,hashlib; h = ' eb2297e1a458f27d836c04bb0cbaf282 ' + ' d0e7a3098092775ccb37ca9d6b2e4b7d '; 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 ())); by = Urllib2.urlopen (' http://packagecontrol.io/' + pf.replace (', '%20 ')). read (); DH = hashlib.sha256 (by). Hexdigest (); Open (Os.path.join (IPP, PF), ' WB '). Write (by) if DH = = h else None; Print (' Error validating download (got%s instead of%s), please try manual install '% (DH, h) if DH! = H Else ' please rest Art Sublime Text to finish installation ') </span>

 


If the installation is unsuccessful, you can use the manual installation method, the following is the original:



If for some reason the console installation instructions does not work for you (such as has a proxy on your network), per form the following steps to manually install the package Control:


    1. Click the Preferences > Browse Packages ... menu (Click menu Preference-browse Packages, open file browser)
    2. Browse up a folder and then into theinstalled packages/folder
    3. Download Packagecontrol.sublime-packageand copy it into theinstalled packages/directory (can be downloaded by clicking the link)
    4. Restart Sublime Text


After you install the package control, you can install the plugin by opening the package control with the shortcut key ctrl+shift+p. Enter the install package in the Open input box,





Enter, wait for a while, and then in the input box that appears again, enter ConvertToUTF8, carriage return, wait a while, and then install.



Unfortunately, I did not succeed in the way of command, and I installed it manually. But follow its steps, or not.



The main difference here is in the second step: Browse up a folder and then into theinstalled packages/folder.



Online translation of Browse up means back to the upper level of the directory, and it happens that there is a "installed Packages" directory in the upper level. So, it's natural to unzip the downloaded Package Control pack there. In fact, the meaning of the English sentence is almost the same meaning. But it does not work for me in the end. So, I directly unzip the package control to the first step of the Open "Packages" directory, incredibly can carry out the following steps. You say irritating not irritating ah!?



So, the final directory structure is as follows:









In addition, the UTF8 format of Chinese files can be displayed, but some of the "notepad" to save the ANSI-encoded Chinese, or garbled. Some say you can install another GBK Encoding support package. Results Ctrl+shift+p,install package does not show GBK Encoding support packages. A check to know that this package is supported sublime Text 2, does not support 3. What the hell is the problem? Hope Master Enlighten!!









Sublime Text 3 Chinese garbled problem solving and correcting on-line 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.