Forum Moderators: coopster
This code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Ø
</body>
</html>
in a .html file works fine.
in a .php file the Ø is corrupted.
There's no actual PHP code in the file, so it's just a matter of the PHP parser changing it. My default charset in php.ini is set up correctly.
What do i need to do?
Thanks
Russell.
Did you look to see what headers the server sends in both cases? Firefox "live headers" (or something like that) extension will tell you what's being sent.
http://www.example.co.uk/new/test.html
GET /new/test.html HTTP/1.1
Host: www.example.co.uk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
HTTP/1.x 200 OK
Date: Sat, 10 Sep 2005 15:54:36 GMT
Server: Apache/2.0.50 (Fedora)
Last-Modified: Sat, 10 Sep 2005 15:54:28 GMT
Etag: "616c142-ef-e8bcd500"
Accept-Ranges: bytes
Content-Length: 239
Connection: close
Content-Type: text/html; charset=WINDOWS-1251
with .php extension
http://www.example.co.uk/new/test.php
GET /new/test.php HTTP/1.1
Host: www.example.co.uk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
HTTP/1.x 200 OK
Date: Sat, 10 Sep 2005 15:54:50 GMT
Server: Apache/2.0.50 (Fedora)
X-Powered-By: PHP/4.3.10
Content-Length: 239
Connection: close
Content-Type: text/html; charset=WINDOWS-1251
[edited by: jatar_k at 7:48 pm (utc) on Sep. 10, 2005]
[edit reason] examplified [/edit]