gbk, utf8, dilemma_PHP tutorial
While reading "O'Reilly Upgrading to php(as the current mainstream development language) 5", on a whim, I upgraded MySQL(the best combination with PHP) to 4.1 .11, since there is no formal system on the machine, no change in its character set has been noticed. Later, the officially applied system was also upgraded. After the upgrade, other systems were fine. Only one MANTIS was in trouble. When opening the page, it became garbled. Fortunately, there was a backup to restore. During the restoration process, MySQL was discovered. (The best combination with PHP)Character set problems caused by the upgrade - if MySQL(The best combination with PHP)uses UTF8 character set, MANTIS data import Afterwards, the page displayed garbled characters, and I had no choice but to adjust MySQL (the best combination with PHP) to the GBK character set.
Actually, I am still willing to use the UTF8 character set, because there is no incompatibility trouble. As long-term retained data, it is easier to convert and organize in the future; when exchanging data with the outside world, there is no encoding. Conversion problem. But I still don’t understand how to use php (as the current mainstream development language) to connect to MySQL (the best combination with PHP) to receive user input data and store it in the database When, if the database encoding is UTF8, do you need to convert the SQL data to UTF8? Take the time to make a small program to try. If this is the case, it will be a big trouble. However, I use the command line to operate MySQL with UTF8 character set under DOS (the best combination with PHP) The server is not There is no way to input Chinese characters.
When I used SYBASE, I was troubled by the character set problem for a long time. Because if SYBASE used the wrong character set, some Chinese characters could not be input at all, such as the capital zero "○", so the character set changed from iso_1 was changed to cp850, and then from cp850 to cp936. A lot of historical data was discarded in the process. MySQL (the best combination with PHP) don't let me make the same mistake again.

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

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

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.

In this chapter, we are going to learn the following topics related to routing ?

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

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

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