2012-01-08 3 views
2

に異なっUTF-8文字:これは私のテストベッドサーバ同じファイルが表示され、ここでインターン背後にクリーンアップする二つのサーバ

http://www.surreydata.dreamhosters.com/index.php?page=project_presentation_fr

上で正しくUTF-8文字をアクセントフランス語のテキストが表示されたファイルが含まれるページがあります<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

ページはcharctersが正しく

<? header('Content-Type:text/html; charset=UTF-8'); ?>が追加された場合にも表示されない本番サーバーに移動されます。

http://vps6533.inmotionhosting.com/~hnocor5/surrey/index.php?page=project_presentation_fr

しかし、含まれている場合は、符号化の問題は消え直接アクセスされます。

http://vps6533.inmotionhosting.com/~hnocor5/surrey/project_presentation_fr.php

これを修正するために何をすべきか上の任意のアドバイスを?

ライブHTTPヘッダーの最初のブロックが正しいエンコードを示しています。

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 
+0

「UTF-8」はエンコードされていませんか? –

+0

両方のURLで同じエンコードエラーが発生しています(Chromeの場合)。 HTTP/1.1 200 OK Date: Sun, 08 Jan 2012 21:45:37 GMT Server: Apache Keep-Alive: timeout=3, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html ceving

+0

同じデータベースからのデータか、開発データベースと本番データベースがありますか? –

答えて

1

注、私はcharsetを変更する場合:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> 

動作するように表示されます。デモ:

http://jfcoder.com/test/index.php.htm

+0

これは、ブラウザが受け取ったテキストがutf-8でないことを意味します。 – DamirR

+0

ここにタグを変更したテストファイルを追加しました。私のブラウザは変更されていません:http://vps6533.inmotionhosting.com/~hnocor5/surrey/test.php?page=project_presentation_fr – jerrygarciuh

+0

@ jerrygarciuh - あなたのPHPヘッダの 'content-type'は' text/htmlです。 charset = UTF-8'。 –

関連する問題