I've been dealing with a bug where a user will copy and paste text from an email onto a form on our page, but the text is cut off at special characters such as u201D (”) when it's inserted into the database with mysql_query()
.
On my development machine (windows) I backed up the database, dropped it, recreated it with CHARACTER SET utf8
and loaded the backup. Now it works correctly on my dev machine.
I tried the same fix on the live server (linux) and while everything shows up as utf8, the text is still being cut off.
My dev machine is running:
MySQL version: 5.7.9
PHP version: 5.6.16
The server is running:
MySQL version: 5.5.35-1ubuntu1
PHP version: 5.4.30
(We are planning to update MySQL / PHP, but a lot of code will need to be fixed first).
Does anyone know what the problem could be? Thanks.