Sublime text3: Support GBK Encoding

Source: Internet
Author: User

To enable sublime text3 to support GBK encoding, the basic principle is to install package control, and then install the package of converttoutf8 through package control.

The method is as follows: press Ctrl + ~ Open the command line and enter

 
ImportUrllib. 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 ())

After running the command, restart the application.

Then, press Ctrl + Shift + P to open the search box, enter install package, and press Enter. All the packages are displayed. Search converttoutf8 and press enter to download the package.

Converttoutf8 is used to convert gb2312 and GBK files to utf8 encoding. Therefore, garbled characters will not occur when you open a GBK-encoded file later.

In addition, you can install the GBK encoding support package if you need to save it in GBK encoding after editing.

 

Sublime text3: Support GBK Encoding

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.