0

I am trying to create a html page on which I want to display some characters in several places from the French character set:

Lower case : à â æ ç é è ê î ô œ ù û
Upper case : À Â É È

I'm uncertain about how to add the entire charset to my html code. I haven't found any easy to understand resources on the web till now. I'd be grateful for any help.

Ronophobia
  • 349
  • 3
  • 16
  • possible duplicate of [How can I properly display German characters in HTML?](http://stackoverflow.com/questions/423693/how-can-i-properly-display-german-characters-in-html) – Jukka K. Korpela Mar 19 '13 at 09:59

2 Answers2

1

I'm pretty sure that adding the following to your <head> will enable the correct display of character sets you're after:

<meta charset='utf-8'>

or

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

For the difference (or lack thereof), refer to this SO question an answer (note: HTML5 doctype):
<meta charset="utf-8"> vs <meta http-equiv="Content-Type">

Example:

<html>
    <head>
        <!-- Head content -->

        <meta charset='utf-8'>

        <!-- More head content -->
    </head>
    <body>
        <p>Your content here</p>
    </body>
</html>
Community
  • 1
  • 1
Jace
  • 3,052
  • 2
  • 22
  • 33
  • Yeah it should. The answer states that if you are using a HTML5 doctype they should be equivalent. I'm not too sure what the differences are when not using a HTML5 doctype (if any at all), but one or both should definitely work with whatever doctype you might be using. – Jace Mar 19 '13 at 07:16
  • Ok! If it works, please don't forget to mark this as the answer! if it doesn't work, come right back and we'll see what we can sort out! – Jace Mar 19 '13 at 07:18
  • The question fails to address the issues of *actual* character encoding (as opposite to declared encoding) and HTTP headers (which override any `meta` tags). – Jukka K. Korpela Mar 19 '13 at 09:53
  • Is that the reasoning behind the downvote of my answer? Because the question fails to address something? – Jace Mar 19 '13 at 09:55
1

You are right, but let me point you out on the fact that is always preferable using the HTTP declaration because they are the one with the highest priority. This means that having both the HTTP header and the document to serve the Content-type (either with Pragma or Meta directives) is simply a waste of bytes.

For more info, read here. http://www.w3.org/International/questions/qa-html-encoding-declarations

Andrea Moro
  • 676
  • 2
  • 9
  • 20