Dede releases static page garbled characters

Source: Internet
Author: User
Dede releases static page garbled characters. dede is of gbk version.
The template is also gb2312
After a static page is generated, open it. The utf encoding is selected by the browser by default. garbled characters are displayed. change the browser encoding to gbk, and the display will be normal.
After I changed the server, the template was reversed and never moved.
Why?


Reply to discussion (solution)

Set the php. ini file default_charset = "gbk"

Set the php. ini file default_charset = "gbk"

Need to restart php?


Set the php. ini file default_charset = "gbk"

Need to restart php?


Well, restart APACHE.



Set the php. ini file default_charset = "gbk"

Need to restart php?


Well, restart APACHE.

No, it is garbled again after restart.




Set the php. ini file default_charset = "gbk"

Need to restart php?


Well, restart APACHE.

No, it is garbled again after restart.


There is no problem locally, right?




Set the php. ini file default_charset = "gbk"

Need to restart php?


Well, restart APACHE.

No, it is garbled again after restart.


Is the generated static page parsed using gbk?





Set the php. ini file default_charset = "gbk"

Need to restart php?


Well, restart APACHE.

No, it is garbled again after restart.


There is no problem locally, right?

Is on the linux system






Set the php. ini file default_charset = "gbk"

Need to restart php?


Well, restart APACHE.

No, it is garbled again after restart.


There is no problem locally, right?

Is on the linux system


Windows's default encoding is GBK, and Linux's default encoding is UTF-8. The edited Chinese characters in Windows are garbled characters in Linux. To solve this problem, modify the default Linux encoding to GBK. The method is as follows:

Method 1:

Vi/etc/sysconfig/i18n

LANG = "zh_CN.GBK"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh"
SYSFONT = "latarcyrheb-sun16"

Method 2:
Vi/etc/profile

Export LC_ALL = "zh_CN.GBK"
Export LANG = "zh_CN.GBK"

Set the php. ini file default_charset = "gbk"

After the problem is solved, the staff may use other software to reverse the data, and the code may be changed. just try again. thank you for your various methods!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.