Chinese Web Sites Using PHP - v2.23, by Herong Yang
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.
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.
Table of Contents