Home >Development Tools >sublime >Problem with garbled characters when opening TXT files in sublime
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.
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
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.
After successful installation, the introduction and configuration file of the plug-in will be automatically opened.
Then we can see that the garbled file just now can be opened with the correct encoding format.
Uninstall plug-ins
Of course, if we want to delete some plug-ins, we can uninstall them through the remove command.
#Then select the plug-in you want to uninstall and click it.
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!