phpapachehttp-postspecial-characterssmart-quotes

Black Diamond Replacing Smart Quotes in a Post


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.


Solution

  • 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.