Hello. I'm trying to create a script that copies data from an old legacy mysql database into my new utf-8 formatted database.
One particular field is causing me trouble, its a latin1 field - and one record has the following in it:
!-#$%'&*£¥
When the update is performed, I get the following error message:
Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xA3' for column 'messageContent' at row 1 in C:\xampp\htdocs\portal\
library\Zend\Db\Statement\Pdo.php on line 234
Now, I'd like to strip characters that cause a problem, but other than checking ord($character) <= 126
I don't know what to do. I'm worried that my method might lose valuable data.
I am using MySQL 5.1.43 on Windows 7 - with PHP 5.3.1