


Completely solve the problem of Chinese UTF-8 garbled characters in PHPMyAdmin_PHP Tutorial
php(as the current mainstream development language)MyAdmin’s Chinese garbled problem is very common and very annoying. In the past, I used php(as the current mainstream development language)MyAdmin. I recently installed it and found it very convenient. However, I also encountered the problem of garbled Chinese characters, mainly because UTF-8 and GB2312 encoding could not be used. Also displayed correctly. I found some information from the Internet, but it is not very direct. Now I will reorganize it based on my own operation.
1. Because the default encoding of MySQL(the best combination with PHP) is latin1, so first we need to modify php(as the current mainstream Development language)Encoding conversion for MyAdmin. Modify the select_lang.lib.php(as the current mainstream development language) file under the libraries directory, and change
[indent]
utf-8 => utf8,
to
utf-8 => latin1,
[/indent]
2. Next, we need to modify the encoding display of the page, changing
[indent]
zh-gb2312 => array(zh|chinese simplified, chinese_simplified-gb2312, zh),
modified to
zh-gb2312-utf-8 => array(zh|chinese simplified, chinese_simplified-gb2312, zh ),
[/indent]
That is, add -utf-8 after zh-gb2312, so that the page encoding supports UTF-8.
3. First select zh-gb2312-utf-8 to enter php (as the current mainstream development language) MyAdmin. At this time, browsing GB2312 encoded data is normal, but browsing UTF-8 The data is garbled. If you want to browse UTF-8 data, go to the homepage and select zh-utf-8 in Language.
A few notes:
1. The default language encoding is very long, you can comment out other encodings with /**/, leaving only zh -gb2312-utf-8 and zh-utf-8 two encodings.
2. Currently php (as the current mainstream development language)The latest version of MyAdmin is 2.8.0-rc1, but the language selected on the homepage of this version cannot be specific to the encoding, so it is not Recommended.

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

AI Hentai Generator
Generate AI Hentai for free.

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



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

This chapter deals with the information about the authentication process available in CakePHP.
