If you don't know what an HTTP header is, read more here.
HTTP ("internet") requests/responses consist of two parts: the headers and the body. An HTTP response looks something like this, for example:The Headers are in the top portion; the Body is everything below the blank line. Note that that means all of your HTML is part of the HTTP body. It is a bit confusing, because HTML uses the same terms ("<head>" and "<body>") with html-specific meanings. So, what's happening in your case is something like this:Code:HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
ETag: "3f80f-1b6-3e1cb03b"
Content-Type: text/html; charset=UTF-8
Content-Length: 131
Accept-Ranges: bytes
Connection: close
<html>
<head>
<title>An Example Page</title>
</head>
<body>
Hello World, this is a very simple HTML document.
</body>
</html>
See how the HTTP headers say one thing ("ISO-8859-1") and the HTTP body says something else ("UTF-8", in your <meta> tag)? Almost every browser (indeed, every browser period, as far as I know) will believe the HTTP header, and ignore the meta tag. The only time specifying the charset in your html will have any effect is when no corresponding HTTP header is sent—in fact, that's the situation they were designed for.Code:HTTP/1.1 200 OK
Content-Type: text/html; charset=ISO-8859-1
Other-Headers: etc..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<!-- the rest of your html ... -->
Since your server is automatically setting a header with the wrong charset, you need to specify the correct one. That's exactly what the header function does.PHP Code:<?php
header( "Content-type: text/html; charset=UTF-8" );
// etc. ...

