Detailed introduction to Weaving dream gbk/gb2312 to utf-8 coding operation procedure (whole station modification method)

Source: Internet
Author: User
This article mainly introduces the weaving dream gbk/gb2312 to Utf-8 coding operation Step (whole station modification method), the need of friends can refer to the next

MIP on the code is strict requirements, must be UTF-8, then for most of the GBK or GB2312 users can only first convert the website as a whole, in order to perform MIP transformation, otherwise the modified page is garbled a large.

Why does MIP support only utf-8? At present, some mobile phone comes with a browser only support UTF-8, open GBK website will appear garbled, so in order to phone compatibility, MIP here Standard page encoding for UTF-8. At the same time, we recommend that you do the site as far as possible using UTF-8, not only the international mainstream code, and the quality of the site will be reduced. At the same time this tutorial is applicable to other PHP system CMS, the approximate principle is UTF-8 program replacement, template transcoding, database transcoding, the operation of the three parts. Detailed explanations are as follows.

transcoding Preparation--Back up the original GBK website

Before transcoding, we need to have some preparatory work and precautions

First, for the GBK (GB2312) original website, the steps are as follows:

First, the use of back-Office data backup function for database backup, into the background, click, (or with imperial backup king)

System-System settings-database backup/Restore a database form appears here,

Click "OK" here to make a database backup, depending on the size of the database, the backup time varies.

Second, after waiting for the database to be backed up, package all the files under the root directory of the Web site and back up

To this site information and database backup completed.

The purpose of the whole station backup is to prevent the whole station recovery after the transcoding fails.

The complete Weaving Dream website is divided into three parts, the program , the template , the database , we sequentially for these three parts transcoding operation.

The principle of transcoding is

Using the Imperial data backup King to transcode the database,

Using the UTF-8 program to replace the GBK program directly,

Use the Web Editor to transcode the template.

★ transcoding of work disassembly database transcoding

Database transcoding, testing several ways to find the most secure transcoding is the most complete way to use the Imperial data backup

Template Download Address Www.php.cn/xiazai/code/dedecms We get in the compression package

This upload can be changed to another name and put it on the website, for example, I changed to Shuju

Then put this directory under the site, access to the address is the domain name/shuju

Default background admin password 123456

After landing, there is a database setup, we want to use the original site database address, database user, database password input set. (You may want to modify the default login password and random verification code, modify it yourself)

Then click "Backup Data" under "Backup and Restore Database"

The database of your original site will appear, click "Back up data" behind the database

The page that appears at this point is very important but also very simple, here to transcode

Here we have to manually select UTF8 and then back up the database, is UTF8, that is, the transcoding

Storage directory to remember, because we back up, we need to restore, restore the time to use it

Click "Start Backup" below to automatically back up.

After the backup, we have to restore the database back to the code, the following first program and template transcoding, program and template transcoding, we restore the database.

★ transcoding Work Disassembly procedure transcoding

program transcoding about the next step is to complete the backup, the backup package, and then empty the site space (only to clear the site space information, Imperial data backup king do not clean up, restore data to use!) ), download the new UTF-8 program, perform the installation, and complete the transcoding work for the program section at this time.

Download unzip, we get the uploads inside the file is the kernel file of the program, upload to the site space

Installation steps in detail, here to understand the dream installation scan skipped. Transcode directly to the next template.

1th step, run your domain/install/index.php

2nd step, tick, I have read and agree to this agreement, click Continue

3rd step, if the following appears continue, click Continue to proceed to the next step, as for the Red Fork what the general no tube, if not appear to continue, you have to have space problems, please self-search for space reasons.

4th step, here is the most important part, according to, template selection there we basically do not need to choose what to start the second block, database settings, here are several concepts "database Host", "Database name", "Database User", "Database Password", "Data table prefix", "Database Encoding". Please fill in the details of the space quotient or the database you create yourself.

The third block, the Administrator account password, self-filled

Chapter Four, Site Settings here, the site name changed to your own, the other generally do not need to move, especially the cookie plus password this try not to move, the other in the background can be changed

Do not tick the initialization data for the experience, directly click Continue, the installation is complete!

I enclose my installation parameters for everyone to look at.

Come out below the interface to prove your installation was successful

The program transcoding section here is finished, at this time, we get a blank UTF-8 of the weaving dream site.

★ transcoding Work Disassembly template transcoding

Please be sure to use professional web editing software to do this step!

I recommend that you use Dreamweaver or notepad+, and of course there are small tools for template bulk GBK transcoding utf-8 on the web. You can't change it with Notepad! The front end can skip the template transcoding tutorial.

First of all, we will be in the backup of the site materials, separate our template files, which have the program template files in the root directory of the site is generally located under the Templets folder, as well as CSS and JS files, need to find themselves, to replace the transcoding because the template files and style files are different, I am here only to use Dreamweaver to replace a Web page to do a demonstration, in fact, the front end to see this smile, this is really nonsense ...

Open one of the template files with Dreamweaver.

Click Edit-Page Properties-title/Encode-encode, which should appear at this time

We selected Simplified Chinese (GB2312) as Unicode (UTF-8),

Click OK, the template file is successful, in this way, all the extracted template files , transcoding. Once the transcoding is complete, upload the appropriate location to the newly installed UTF-8 site.

transcoding work closure-Restore website

Here, the database transcoding but not restored, the program transcoding complete but blank data, template transcoding complete

Then use the Empire Data backup King, restore the database

To do this, log in to the domain name/shuju

Click on "Backup and Recovery database" under the recovery data, select the data source directory, just back up the database that directory, the following in the "Database to import" Select the data table (that is, the original site data table), click Start Recovery.

After the recovery, the original GBK database was transcoded into UTF8.

Here, we have the website from GBK complete transcoding into Utf-8, you can transform MIP.

transcoding Precautions

1, if the program has been changed or two times development, do not recommend transcoding

2, transcoding after landing backstage, click, System Settings-system basic parameters, in the Site settings here, click OK

3, if the build or template error, click Build-Automatic task-update system cache

4, Dream template label to use the most compatible template label possible

The transcoding process of weaving dreams can also be applied to other PHP CMS system transcoding.

What is the problem, please reply to discuss, I also tireless efforts to amend ... Because I am the amendment card ...

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.