Home  >  Article  >  Development Tools  >  Problem with garbled characters when opening TXT files in sublime

Problem with garbled characters when opening TXT files in sublime

藏色散人
藏色散人forward
2019-09-25 10:41:126205browse

Sublime Text: An editor software with code highlighting, syntax prompts, auto-completion and fast response. It not only has a gorgeous interface, but also supports plug-in extension mechanism. It is definitely a pleasure to write code with it.

Problem with garbled characters when opening TXT files in sublime

However, when we use Sublime to open a TXT file, garbled characters often occur due to encoding problems. So what should you do if you encounter this kind of problem? Below, the sublime tutorial column will introduce the solution to you.

This is because the default saving encoding format of the TXT notepad that comes with the computer is GBK, and Sublime text does not support GB2312 and GBK encoding, so the following situation will occur

Problem with garbled characters when opening TXT files in sublime

But fortunately, Sublime’s powerful extension functions can solve this problem through other plug-ins. This plug-in is ConvertToUTF8

Installation plug-in

To install the plug-in, you need to install it through the Package install command. Use the ctrl shift p shortcut key to call out the command line and enter install to enter. Package install mode, then look for ConvertToUTF8.

Problem with garbled characters when opening TXT files in sublime

After successful installation, the introduction and configuration file of the plug-in will be automatically opened.

Problem with garbled characters when opening TXT files in sublime

Then we can see that the garbled file just now can be opened with the correct encoding format.

Problem with garbled characters when opening TXT files in sublime

Uninstall plug-ins

Of course, if we want to delete some plug-ins, we can uninstall them through the remove command.

Problem with garbled characters when opening TXT files in sublime

#Then select the plug-in you want to uninstall and click it.

Problem with garbled characters when opening TXT files in sublime

The above is the detailed content of Problem with garbled characters when opening TXT files in sublime. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete