Home>Article>Development Tools> The principle and solution of Chinese garbled characters in sublimetext3

The principle and solution of Chinese garbled characters in sublimetext3

云罗郡主
云罗郡主 Original
2019-03-13 14:46:51 31927browse

I believe that when many people use sublime to edit html code and run it in the browser, Chinese garbled characters will appear. Then,sublime usage tutorialcolumn will talk about sublimetext3 The principles and solutions to Chinese garbled characters.

1: The principle of Chinese garbled characters in sublimetext3

When we edit the html code and save it locally, when we preview it, unintelligible fonts will appear. This is the effect of Chinese garbled characters. When we open it with a text editor, we use the corresponding character set, which makes the characters unreadable. The garbled characters that appear on the web page are generally caused by the encoding failure. [Recommended article:How to run html code in sublime

The principle and solution of Chinese garbled characters in sublimetext3

In fact Garbled characters occur not only in HTML pages, but also in the storage of databases and the writing of some advanced code languages. Computers cannot directly store Chinese, but compile Chinese through specific encoding. The corresponding binary is generated, and then the corresponding binary number is generated and stored in the computer. When we want to display Chinese, the binary is compiled into the corresponding Chinese.

Two: sublimetext3 solution

The sublimetext3 solution is that when we store, just select the Chinese encoding method. Please see the following operations for details:

1. Open sublime and find File,

The principle and solution of Chinese garbled characters in sublimetext3

2. After modification, the html will display normally.

The principle and solution of Chinese garbled characters in sublimetext3

The above is a complete introduction to the principles and solutions of Chinese garbled characters in sublimetext3. For more information, please pay attention to the PHP Chinese website.


The above is the detailed content of The principle and solution of Chinese garbled characters in sublimetext3. 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