Chinese Web Sites Using PHP - v2.23, by Herong Yang
Steps and Application Components Involved
This section describes steps and application components involved in saving Chinese text into MySQL database through Web forms and retrieved it back to Web pages.
In order to create a Web form to take Chinese input text into MySQL database and retrieve it back to a Web page, you need to understand how a Chinese input text is being created and transferred through various application components to reach MySQL database, retrieved back to a Web page. Here is a simplified diagram that shows the steps and application components involved in this process:
W1. Key Sequences from keyboard | |- Web browser v W2. HTTP Request | |- Web server v W3. CGI input | |- PHP engine v W4. SQL statements | |- MySQL v W5. Database tables | |- MySQL v W6. Result sets | |- PHP engine v W7. CGI output | |- Web server v W8. HTTP response (HTML document) | |- Web browser v W9. Chinese characters on the screen
If you decided to use UTF-8 encoding to handle Chinese characters, you need to make sure that all applications mentioned in the above diagram are friendly to UTF-8 encoding. See the following picture:
Table of Contents