Reputation: 16724
This file is in UTF-8 already with:
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
in the top but the word CAFÉ
gets displayed as the following:
the HTML is:
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> form... </title>
</head>
<body>
CAFÉ
...
</body>
</html>
How do I fix it?
Upvotes: 0
Views: 235
Reputation: 201866
The document is in fact interpreted as windows-1252 encoded. The UTF-8 form of “É” consists of the two bytes 0xC3 0x89. Interpreted as windows-1252, they denote “Ô and “‰”.
The most probable cause is that the HTTP headers sent by the server specify windows-1252 as the encoding (or iso-8859-1, which actually means the same thing). This information overrides any meta
tags in the document itself.
Upvotes: 4