Home>Article>Development Tools> The principle and solution of Chinese garbled characters in sublimetext3
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】
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,
2. After modification, the html will display normally.
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!