"Specifying Character Encoding" FAILS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

"Specifying Character Encoding" FAILS

Sono-2
I tried your example (see right here-under) but it does not work.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"


<html lang="fr">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<title>Exemple de document HTML 4.01</title>
</head>

<body>
<h1>Un document français</h1>

<p>L'élève va à l'école et ceci est écrit en Français!</p>

</body>
</html>

For each French specific character, I get question marks in a diamond (lozenge); see enclosed picture (here-under on Mac, in attachment on PC)


Thank you for your time.

D. Lauwers

Reply | Threaded
Open this post in threaded view
|

Re: "Specifying Character Encoding" FAILS

Douglas Clifton
On the client end:

1. The browser should be configured to accept UTF-8 character encoding.
2. The system needs a font that includes the UTF-8 code points/glyphs.

On 7/22/07, Sono <[hidden email]> wrote:
I tried your example (see right here-under) but it does not work.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "<a href="http://www.w3.org/TR/html4/strict.dtd" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.w3.org/TR/html4/strict.dtd ">


<html lang="fr">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<title>Exemple de document HTML 4.01</title>
</head>

<body>
<h1>Un document français</h1>

<p>L'élève va à l'école et ceci est écrit en Français!</p>

</body>
</html>

For each French specific character, I get question marks in a diamond (lozenge); see enclosed picture (here-under on Mac, in attachment on PC)


Thank you for your time.

D. Lauwers




--
Douglas Clifton
[hidden email]
http://loadaveragezero.com/
http://loadaveragezero.com/app/s9y/
http://loadaveragezero.com/drx/rss/recent
Reply | Threaded
Open this post in threaded view
|

Re: "Specifying Character Encoding" FAILS

Karl Dubost
In reply to this post by Sono-2

Hi D Lauwers.

Le 22 juil. 2007 à 21:53, Sono a écrit :
> <html lang="fr">

Here you specified the language used in your document.
        French Language

> <meta http-equiv="content-type" content="text/html; charset=UTF-8">

Here you specified the encoding used in your document.
        UTF-8

> <p>L'élève va à l'école et ceci est écrit en Français!</p>

Here some actual French text.

1. Do you see question marks when you look at the document locally on  
your computer with the browser? (open file… with the browser)
    If the document is fine locally, it means you have the right  
encoding.
    If not, your document is maybe written with another encoding.

2. Now when you put your document online, it has been written with  
one encoding, you have to be careful that the server sends the right  
information with your document.
    If you do not have control on the server configuration but have  
access to PHP, you can fix the HTTP headers for this file.

http://www.w3.org/International/techniques/server-charset#setting
Specifically
http://www.w3.org/International/O-HTTP-charset
header('Content-type: text/html; charset=utf-8');


--
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager, QA Activity Lead
   QA Weblog - http://www.w3.org/QA/
      *** Be Strict To Be Cool ***