PHP programs written using Sublimt txt3 are displayed as garbled Chinese characters in the browser?
不痛的石头
不痛的石头 2017-11-24 23:23:03
0
6
1391

I am a beginner. I initially used the txt that comes with the windows system to write code. Because default_charset = "gb2312" has been configured in php.ini, Chinese can be displayed normally. I have learned to use Sublimt txt3 to write code in the past two days. It is indeed very convenient, but there is a problem. Although the software chooses to save using utf-8, the Chinese characters in the browser display garbled characters. If I use txt to write, it can be displayed normally. ! I also found a solution online, which is to add a character setting code to the code, but does anyone know how to set Sublimt so that it can be written like the code written in txt and display Chinese directly?


不痛的石头
不痛的石头

reply all(3)
myfey

The file encoding is wrong. The file encoding should be changed to ANSI Chinese encoding format. .

给你买辣条

Develop a good habit of using utf8. Do not use other encodings

路过

Browser settings encoding utf8

  • reply It is true that right-clicking on the browser and selecting UTF8 displays normally, thank you.
    不痛的石头 author 2017-11-25 09:58:26
  • reply Go back to php.ini and change the charset to utf8, and it will display normally. After looking at Baidu, I found out that utf8 is commonly known as universal code.
    不痛的石头 author 2017-11-25 10:07:15
  • reply Current encoding generally uses utf8
    路过 author 2017-11-25 10:08:09
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template