French Characters in HTML Documents - ISO-8859-1 Encoding

This section provides a tutorial example on how enter and use French characters in HTML documents using Unicode ISO-8859-1 encoding. The HTML document should include a meta tag with charset=ISO-8859-1 and be stored in ANSI format.

Now we know how to make French characters working in a HTML document in UTF-8 encoding schema. Next let's see how to use French characters in HTML documents in ISO-8859-1 encoding schema.

1. On a Windows system, run Start > All Programs > Accessories > Notepad.

2. In Notepad, enter the following HTML document:

<html>
<!-- HelpIsoFrench.html
#- Copyright 2009 (c) HerongYang.com. All Rights Reserved.
-->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<body>
<b>Help</b><br/>
English: System load is very high.<br/>
French: L'utilisation de système est très haute.<br/>
</body>
</html>

3. To enter the French character, "e with grave", you can run Start > All Programs > System Tools > Character Map. Select "e with grave" on the character map. Click the Select button, then the Copy button. Go back to your Notepad and click Ctrl-V to paste "e with grave" into your HTML document.

4. Select menu File > Save as. Enter the file name as HelpIsoFrench.html. Select "ANSI" in the Encoding field and click the Save button. Note that ANSI is encoding schema defined by Microsoft and used on Windows system. ANSI contains more characters than ISO-8859-1. But it is compatible with ISO-8859-1.

5. Copy HelpIsoFrench.html to c:\apache\htdocs. Make sure your Internet Information Service is running the local default Web site.

6. Now run Internet Explorer (IE) with http://localhost/HelpIsoFrench.html. Your should see the French characters displayed correctly as shown below:

Help
English: System load is very high.
French: L'utilisation de système est très haute.

7. On the IE window, select menu View > Encoding. You should see "Western European" is selected. Again "Western European" is a different name for ISO-8859-1.

Easy to do, right? We could make it even easier. You can remove the <meta> tag setting in HelpIsoFrench.html. French characters will still show up on the IE window. This is because ISO-8859-1 is the default encoding schema to IE.

Table of Contents

 About This Book

 Introduction and Installation of PHP

 PHP Script File Syntax

 PHP Data Types and Data Literals

 Variables, References, and Constants

 Expressions, Operations and Type Conversions

 Conditional Statements - "if" and "switch"

 Loop Statements - "while", "for", and "do ... while"

 Function Declaration, Arguments, and Return Values

 Arrays - Ordered Maps

 Interface with Operating System

 Introduction of Class and Object

 Integrating PHP with Apache Web Server

 Retrieving Information from HTTP Requests

 Creating and Managing Sessions in PHP Scripts

 Sending and Receiving Cookies in PHP Scripts

 Controlling HTTP Response Header Lines in PHP Scripts

 Managing File Upload

 MySQL Server Connection and Access Functions

 Functions to Manage Directories, Files and Images

 SOAP Extension Function and Calling Web Services

 SOAP Server Functions and Examples

 Localization Overview of Web Applications

Using Non-ASCII Characters in HTML Documents

 Basic Rules of Using Non-ASCII Characters in HTML Documents

 French Characters in HTML Documents - UTF-8 Encoding

French Characters in HTML Documents - ISO-8859-1 Encoding

 Chinese Characters in HTML Documents - UTF-8 Encoding

 Chinese Characters in HTML Documents - GB2312 Encoding

 Characters of Multiple Languages in HTML Documents

 Using Non-ASCII Characters as PHP Script String Literals

 Receiving Non-ASCII Characters from Input Forms

 "mbstring" Extension and Non-ASCII Encoding Management

 Managing Non-ASCII Character Strings with MySQL Servers

 Parsing and Managing HTML Documents

 Configuring and Sending Out Emails

 Image and Picture Processing

 Managing ZIP Archive Files

 Managing PHP Engine and Modules on macOS

 Managing PHP Engine and Modules on CentOS

 Archived Tutorials

 References

 Full Version in PDF/EPUB