Home  >  Article  >  Web Front-end  >  Processing Sublime Text to open Chinese garbled characters in GBK format

Processing Sublime Text to open Chinese garbled characters in GBK format

php中世界最好的语言
php中世界最好的语言Original
2018-04-16 15:29:071671browse

This time I will bring you the precautions for dealing with opening Chinese garbled characters in GBK format in Sublime Text, and dealing with opening Chinese garbled characters in GBK format in Sublime Text. The following is a practical case, let’s take a look.

Sublime Text is a code

editor with a beautiful user interface and powerful features such as codeThumbnails, Python Plug-ins, code snippets, etc. Key bindings, menus and toolbars can also be customized. The main features of Sublime Text include: spell check, bookmarks, complete Python API, Goto function, instant project switching, multi-selection, multi-window and more. Sublime Text is also a cross-platform editor that supports Windows, Linux, and Mac. Operating systems such as OS X.

However, since the default encoding format of Sublime Text is UTF-8, this causes Chinese characters in many GBK-encoded files to display garbled characters. Although we can also pass:

File –> Reopen with the encoding

Choose different encoding formats, but there is no support for GBK. But don’t worry, here we will give you a way to solve the problem of garbled characters when opening GBK format files in Sublime Text.

First, download the

Package Control plug-in through "Installation - Package Control". There are two ways to download this plug-in, namely:

  1. Type 1: Copy the corresponding version of the import command on the above website, then open the console through Control ~ in Sublime Text, enter the copied command, and press Enter to execute Installation;

  2. Type 2: Directly download the Package Control installation package from the above website, and then copy this installation package to Installed Packages folder.

In fact, we only use the

th method when the th method does not work.

After we download (install) the

Package Control plug-in, restart Sublime Text, then open the Search window through the key combination Command Shift P, and enter install package

As shown in the picture above, click

Install Package to open the Package list, then enter Codecs33 and click the corresponding plug-in to install

At this point, after the

Codecs33 plug-in is installed, the problem of GBK Chinese garbled characters can be solved.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Implementation method of pre-order, in-order and post-order traversal of JS binary tree

How to obtain the touch event Sliding distance length

The above is the detailed content of Processing Sublime Text to open Chinese garbled characters in GBK format. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn