Describes in detail the steps for converting Zhimeng GBK/GB2312 to UTF-8 encoding (dynamic route for CDN)

Source: Internet
Author: User
This article mainly introduces how to convert the code from GBKGB2312 to UTF-8 (full-site modification ), if you need it, refer to the next article, which describes how to convert GBK/GB2312 to UTF-8 encoding (full-site modification). If you need it, refer

At present, MIP has strict requirements on the encoding, must be a UTF-8, then for most GBK or GB2312 users can only first the whole site encoding conversion, in order to carry out MIP transformation, otherwise, the transformed page is garbled.

Why only UTF-8 is supported for MIP? At present, some mobile phones with browser only support UTF-8, open GBK Web site will appear garbled, so in order to cell phone compatibility, MIP here norms of the web page code for the UTF-8. At the same time we suggest that you do the site as much as possible to use UTF-8, not only is the mainstream international code, and the quality of the site will be reduced. At the same time this tutorial applies to other PHP System cms, the general principle is UTF-8 program replacement, template transcoding, database transcoding, these three operations. The details are as follows.

Transcoding preparation-back up the original GBK website

Before transcoding, we should have some preparation work and precautions.

First, back up the original website of GBK (GB2312) as follows:

First, use the back-end data backup function to back up the database, go to the back-end, and click in sequence (or use the Empire backup King)

System-system settings-database backup/restoration the database form is displayed here,

Click "OK" here to back up the database. the backup time varies depending on the database size.

Click OK, and the template file will be successful.All extracted template filesTo perform transcoding. After transcoding is complete, upload to the site corresponding to the newly installed UTF-8.

Transcoding finishing-website restoration

At this point, the database is transcoded but not restored. The program is transcoded, but the blank data is displayed. the template is transcoded.

Then, use the data backup King of the Empire to restore the database.

The steps are as follows: logon domain name/shuju

Click recover data under "Backup and Restore database" and select the data source directory, which is the Directory of the database you just backed up. select a data table (the original data table) in "database to be imported ), click start recovery.

After the Restoration, the original GBK database is transcoded to utf8.

Here, we need the website to complete the transcoding from GBK to UTF-8, and then we can transform MIP.

Transcoding considerations

1. transcoding is not recommended if the program has been modified or developed twice.

2. after transcoding, log on to the background and click "system settings"> "basic system parameters". click "OK" at "site settings ".

3. if an error occurs during generation or template generation, choose generate> automatic task> update system cache.

4. try to use the most compatible template tag for the woven dream template tag.

The transcoding process of Zhimeng can also be applied to other php cms systems for transcoding.

If you have any questions, please reply and discuss them. I will also make unremitting efforts to revise them ...... Because I am a correction card ......

The above is a detailed description of the steps for converting the code from GBK to GB2312 to UTF-8 (full-site modification). For more information, see other related articles in the first PHP community!

Related Article

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.