Reputation: 21988
Cleaning up behind an intern here: This include file with French text displays accented UTF-8 characters correctly on my testbed server
http://www.surreydata.dreamhosters.com/index.php?page=project_presentation_fr
The page has <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
When the page is moved to the production server the charcters are not correctly displayed even when
<? header('Content-Type:text/html; charset=UTF-8'); ?>
is added.
http://vps6533.inmotionhosting.com/~hnocor5/surrey/index.php?page=project_presentation_fr
However, if the include is accessed directly the encoding issue disappears:
http://vps6533.inmotionhosting.com/~hnocor5/surrey/project_presentation_fr.php
Any advice on what to do to correct this?
Live HTTP Headers initial block shows the correct encoding.
http://vps6533.inmotionhosting.com/~hnocor5/surrey/index.php?page=project_presentation_fr
GET /~hnocor5/surrey/index.php?page=project_presentation_fr HTTP/1.1
Host: vps6533.inmotionhosting.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
HTTP/1.1 200 OK
Date: Sun, 08 Jan 2012 21:31:28 GMT
Server: Apache
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
Upvotes: 2
Views: 515
Reputation: 49198
Note, when I change the charset
to:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
It appears to work. Demo:
http://jfcoder.com/test/index.php.htm
Upvotes: 1