Chinese Web Pages with Big5 Encoding

This section describes how to create a Chinese HTML document in Big5 encoding and publish it on the Apache server.

Chinese Web pages should use UTF-8 encoding. But for some reason, if you have to use Big5 encoding for your Chinese Web pages, you should enter Chinese characters with Big5 encoding and set the "charset" attribute to "big5". Here is a simple test I did on my local system:

1. Run my Chinese text editor that supports Big5 encoding.

2. Enter the following HTML document:

<!-- Hello-Big5.html
#- Copyright (c) 2005 All Rights Reserved.
<meta http-equiv="Content-Type" content="text/html; charset=big5"/>
<b>Chinese characters in Big5</b><br/>
Traditional characters: ??????<br/>

You see some question marks (?) in the source code listed above, because this book uses UTF-8 encoding. Big5 encoded characters can not be included here.

3. Save the as Hello-Big5.html in Big5 encoding. On my Chinese text editor, I had to select "Big5 text file" as the "Save as type" to ensure my document was saved in Big5 encoding. Like many other Chinese text editors, it supports multiple encodings. If you are not careful, the document could be saved with a wrong encoding.

4. Copy Hello-Big5.html to \local\apache\htdocs.

5. Now run Internet Explorer (IE) with http://localhost/Hello-Big5.html. You should see Chinese characters displayed correctly:

Chinese Web Page using Big5
Chinese Web Page using Big5

This proves that my Chinese editor, the Web server: Apache, and the Web browser: IE, all worked correctly with Chinese characters in Big5 encoding.

Table of Contents

 About This Book

 PHP Installation on Windows Systems

 Integrating PHP with Apache Web Server

charset="*" - Encodings on Chinese Web Pages

 Chinese Character Set Encoding Options

 HTML Document Travel Path

 Chinese Web Pages with UTF-8 Encoding

 Chinese Web Pages with GB18030 Encoding

Chinese Web Pages with Big5 Encoding

 UTF-8 Encoding Pages with GB18030 Characters

 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

 Input Chinese Text Data to MySQL Database

 Chinese Text Encoding Conversion and Corruptions

 Archived Tutorials


 Full Version in PDF/EPUB