Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML Encoding for French characters

Tags:

html

encoding

I have a email template, that has French copy. If I load this email template up in IE I receive square boxes where the accented characters are. How can I combat this? I assume it is down to encoding?

like image 249
LiamB Avatar asked Sep 05 '11 14:09

LiamB


2 Answers

Ensure the HTML template has the correct meta tag in the header for Content-Type.

You did not specify if the encoding is Latin1, UTF-8 or other - you need to find out first in order to use the right value.

Here is what a UTF-8 meta tag would look like:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
like image 155
Oded Avatar answered Oct 04 '22 21:10

Oded


Just make sure that the actual encoding of the textfile (I assume it'll be either ISO-8859-1 or UTF-8) is in accordance with the meta tag defining the encoding in the beginning of the file. e.g.:

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

see http://en.wikipedia.org/wiki/Character_encodings_in_HTML

like image 33
bpgergo Avatar answered Oct 04 '22 20:10

bpgergo