


Detailed introduction to the steps of converting Dreamweaver GBK/GB2312 to UTF-8 encoding (site-wide modification method)
This article mainly introduces the steps of converting Dreamweaver GBK/GB2312 to utf-8 encoding (site-wide modification method). Friends who need it can refer to it
Currently, MIP has strict requirements for encoding, and it must be It is UTF-8, so for most users of GBK or GB2312, they can only convert the entire website encoding before performing MIP transformation, otherwise the transformed page will be a large garbled mess.
Why does MIP only support utf-8? At present, some mobile phone browsers only support UTF-8, and garbled characters will appear when opening GBK websites. Therefore, for the compatibility of mobile phones, MIP standardizes the encoding of web pages as UTF-8. At the same time, it is recommended that everyone try to use UTF-8 when making websites. Not only is it the mainstream international encoding, but the quality of the website will also be reduced. At the same time, this tutorial is applicable to cms of other PHP systems. The general principle is UTF-8 program replacement, template transcoding, and database transcoding. These three parts of the operation. The details are explained below.
★ TranscodingPreparation work——Back up the original GBK website
Before transcoding, we need to have some preparation work and Notes
First, back up the original website of GBK (GB2312). The steps are as follows:
First, use the background data backup function to back up the database, enter the background, and click , (or use Imperial Backup King)
System - System Settings - Database Backup/Restore The database form appears here,
Click "OK" here to perform database backup, according to the database size, backup time Different lengths.
Second, wait for the database backup to be completed, package all the files under the root directory of the website, and back up
to where the website data and database backup are completed.
The purpose of backing up the entire site is to prevent the entire site from being restored after transcoding failure.
The complete Dreamweaver website is divided into three parts, program, template, database, we will convert these three parts in turn code operation.
The principle of transcoding is
Use Imperial Data Backup King to transcode the database,
Use DreamWeaver UTF-8 program to directly replace the GBK program,
Use the webpage editor to transcode the template.
★ Transcoding work dismantling database transcoding
Database transcoding, I tested several methods and found that transcoding is the safest The complete way is to use the empire data backup
template download address www.php.cn/xiazai/code/dedecms. We get the
upload in the compressed package. You can change it to another name and put it in the website. For example, I changed it to shuju
and then put this directory under the website. The access address is domain name/shuju
. The default background admin password is 123456#.
##After logging in, a database setting appears. We need to enter and set the database address, database user, and database password used by the original website in sequence. (You may need to modify the default login password and randomverification code, modify it yourself)
Then click "Backup Data" under "Backup and Restore Database"will The database of your original website appears, click "Backup Data" behind the databaseThe page that appears at this time is very important but also very simple, just transcode hereTranscoding work dismantling program transcoding
Program transcodingThe general steps are, after completing the backup, keep the backup package, and then Clear the website space (only clear the data of the website space, Empire Data Backup King does not need to clean, you still need to use it to restore the data!), download the new UTF-8 program, and install, At this point, the transcoding work of the program part is completed.
Download and decompress, the files we get in uploads are the core files of the program,Upload to the website space
Detailed explanation of the installation steps. If you know how to install DreamWeaver, you can skip it here. Go directly to the next step of template transcoding.
Step 1, run your domain name/install/index.php
Step 2, check, I have read and agree to this agreement, Click to continue
Step 3. If Continue appears below, click Continue to the next step. As for the red cross, you generally don’t need to worry about it. If Continue does not appear, it means you need space. If there is a problem, please find the cause of the space yourself.
Step 4, this is the most important part. According to the picture above, we basically don’t need to choose anything when selecting the template. Let’s start the second part, database settings, here It involves several concepts: "database host", "database name", "database user", "database password", "data table prefix", and "database encoding". Please fill in the information completely against the space provider or the database information you created.
The third block is the administrator account and password. Fill it in by yourself.
The fourth block is the website settings. Change the website name to your own. Generally, you don’t need to change anything else, especially Try not to change the Cookie Encryption code. Others can be changed in the background.
Do not check the initialization data to experience it. Just click Continue and the installation is complete!
I attach my installation parameters for everyone to take a look at.
The following interface appears to prove that you have successfully installed it
Transcoding part of the program That’s it. At this point, we get a blank UTF-8 DreamWeaver website.
★ Transcoding work dismantling template transcoding
Please be sure to use professional web page editing software to perform this step!
I recommend that you use dreamweaver or Notepad+. Of course, there are also small tools on the Internet for template batch GBK transcoding utf-8. Cannot be changed using Notepad! The front end can skip the template transcoding tutorial.
First of all, we need to separate our template files from the backed up website data. Among them are program template files, which are usually in a folder under the templates folder in the root directory of the website, as well as css and js file, you need to find it yourself, replace and transcode it. Since the template file and the style file are different, I only use Dreamweaver to replace a web page for demonstration. In fact, the front-end laughed when I saw this. This is really nonsense. ……
Open one of the template files with dreamweaver.
Click Modify - Page Properties - Title/Encoding - Encoding, and what should appear at this time is as shown in the figure
We will Select Simplified Chinese (GB2312) as Unicode (UTF-8),
and click OK. The template file will be successful. Follow this method to extract all Template file for transcoding. After the transcoding is completed, upload it to the corresponding location of the newly installed UTF-8 website.
★ End of the transcoding work—restoring the website
At this point, the database is transcoded but not restored, the program is transcoded but the data is blank, and the template is transcoded
At this time, use the Imperial Data Backup King to restore the database.
The following steps are to log in to the domain name/shuju
Click on the restore data under "Backup and Restore Database" and select the data The source directory is the directory where the database was backed up just now. Next, select the data table (that is, the original website data table) in "Database to be imported" and click to start recovery.
After recovery, the original GBK database will be transcoded into utf8.
Here, our website is completely transcoded from GBK to utf-8, and MIP can be transformed.
★ Notes on transcoding
1. If the program has been modified or re-developed, transcoding is not recommended
2. Transcoding Then log in to the backend, click System Settings-Basic System Parameters, click OK in Site Settings
3. If there is an error in the generation or template, click Generate-Automatic Task-UpdateSystemCache
4. Try to use the Dreamweaver template tag The most compatible template tag
The transcoding process of DreamWeaver can also be applied to other PHP CMS systems for transcoding.
If you have any questions, please reply to the post for discussion, and I will spare no effort to correct it...because I am the one who fixes the cards...
The above is the detailed content of Detailed introduction to the steps of converting Dreamweaver GBK/GB2312 to UTF-8 encoding (site-wide modification method). For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

The enumeration function in PHP8.1 enhances the clarity and type safety of the code by defining named constants. 1) Enumerations can be integers, strings or objects, improving code readability and type safety. 2) Enumeration is based on class and supports object-oriented features such as traversal and reflection. 3) Enumeration can be used for comparison and assignment to ensure type safety. 4) Enumeration supports adding methods to implement complex logic. 5) Strict type checking and error handling can avoid common errors. 6) Enumeration reduces magic value and improves maintainability, but pay attention to performance optimization.
