Steps and Application Components Involved

This section describes steps and application components involved in retrieving Chinese text from MySQL database to Web pages.

In order to fetch Chinese characters from MySQL database and display it on Web pages, you need to understand how a Chinese input text is being retrieved from the database and transferred through various application components to reach a Web browser. Here is a simplified diagram that shows the steps and application components involved in this process:

R1. Database tables
      |
      |- MySQL
      v
R2. Result sets
      |
      |- PHP engine
      v
R3. CGI output
      |
      |- Web server
      v
R4. HTTP response (HTML document)
      |
      |- Web browser
      v
R5. Chinese characters on the screen

If the Chinese text is stored in MySQL database using UTF-8 encoding, you need to make sure that all applications mentioned in the above diagram are friendly to UTF-8 encoding. See the following picture:
Retrieving Chinese Text from MySQL Database to Web

Last update: 2015.

Table of Contents

 About This Book

 PHP Installation on Windows Systems

 Integrating PHP with Apache Web Server

 charset="*" - Encodings on Chinese Web Pages

 Chinese Characters in PHP String Literals

 Multibyte String Functions in UTF-8 Encoding

 Input Text Data from Web Forms

 Input Chinese Text Data from Web Forms

 MySQL - Installation on Windows

 MySQL - Connecting PHP to Database

 MySQL - Character Set and Encoding

 MySQL - Sending Non-ASCII Text to MySQL

Retrieving Chinese Text from Database to Web Pages

Steps and Application Components Involved

 Fetching ASCII Text from Database to Web

 Fetching Chinese Text from Database to Web

 Fetching Chinese Text from Database to Web in UTF-8

 Fetching Chinese Text from Database to Web in GBK

 Fetching Chinese Text from Database to Web in Big5

 Summary - Fetching Chinese Text from Database to Web

 Input Chinese Text Data to MySQL Database

 References

 PDF Printing Version