Take the 2-minute tour ×

When I post a string via GET or POST with smart-quotes and echo the posted string, the smart-quote renders two black diamond question marks on one server, but â€™ on another server. The server with â€™ is okay, because it will eventually render as the correct UTF8 character, but the two black diamonds seems to mean that the character is no longer recognized. Any suggestions on how to identify why this is happening? The bad reaction is happening on an Apache server running PHP. No database is involved.

share|improve this question
Check out this StackOverflow post: stackoverflow.com/questions/6087309/… –  MonkeyZeus Oct 11 '13 at 20:13
Once the character turns into black diamonds it can't be translated, which is what the above post is about. I'm trying to debug my server setup, so that I can eventually perform the translation to smart quotes, which is no longer doable after a form post/get. –  moluv00 Oct 11 '13 at 20:36
It could be a source issue as well. If the html form sending the POST is on a page which is not encoded with UTF-8 then the transmission is screwed up. How is the POST/GET reaching your server: CURL, html form, AJAX, direct url visit? –  MonkeyZeus Oct 11 '13 at 20:39
Are you doing either <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> or header('Content-Type: text/html; charset=utf-8'); of the HTML page that may be POSTing the data? –  MonkeyZeus Oct 11 '13 at 20:41
I have the same form on two servers. Both html files have the following line: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />. One server returns an encoded character, and one returns a bogus one. –  moluv00 Oct 11 '13 at 20:54
show 4 more comments

1 Answer

up vote 0 down vote accepted

Our server administrator commented out the following line in the php.ini file:

mbstring.http_input = auto

This configuration was commented out in the server that behaved correctly, and solved the problem on the second server. Go figure.

I hope this answer helps someone else.

share|improve this answer
add comment

Your Answer


