Testing Alt Keycodes with IE on a UTF-8 Web Page

This section provides a test on Latin1 Alt keycodes with Internet Explorer (IE) on a Web page with UTF-8 encoding.

There is no easy way to enter Unicode characters in a Web form, unless you are using a non-English key board, a non-English operating system, or an add-on character input application. But for testing purposes, I tried to enter characters as Latin1 Alt keycodes on a Web page defined as UTF-8 encoding. This Web page was generated by the same PHP script, Web-Form-Input-UTF8-Revised.php, described in the previous section.

1. Start Internet Explorer (IE) with this URL: http://localhost/Web-Form-Input-Revised.php.

2. Press the "num lock" key to turn on "num lock" for the numeric key pad.

3. In the text input box, remove the default text. Now enter <Alt>+0128 by pressing and holding down the Alt key and pressing 0, 1, 2, 8 on the numeric key pad. Release the Alt key. The Euro sign shows up.

4. Repeat the same process to enter four more Alt keycodes: <Alt>+0169, <Alt>+0231, <Alt>+0232, and <Alt>+0233.

5. Click the Submit button. The five special characters shows up on the returning Web page with their Hex number values confirming that the PHP script received them correctly.
Entering UTF-8 Characters with Alt Keycodes

6. Check the page URL in the page address box. The five special characters are encoded inside the URL: This indicates that IE is smart. It converts the Latin1 character 0x80 (decimal code value 128) to the UTF-8 byte sequence 0xE282.

http://localhost/test.php
  ?Input=%E2%82%AC%C2%A9%C3%A7%C3%A8%C3%A9&Submit=Submit

Conclusion:

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

 Steps and Components Involved

 Processing Web Form Input in ASCII

 Processing Web Form Input in Latin1

 Entering Latin1 Characters with Alt Keycodes

 Testing Latin1 Alt Keycodes with IE

 Processing Web Form Input in UTF-8

 Outputting Form Default Input Text in UTF-8

Testing Alt Keycodes with IE on a UTF-8 Web Page

 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

 References

 PDF Printing Version