Technique to Replace Special Characters
The below example can assist you to replace the special characters with its equivalent characters to prevent the errors when you retrieve the data back from the MySQL database. This is the widely used technique to replace special chars
Example Code to Replace Special Characters
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '—', '-');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '“', '"');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '”', '"');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '', '"');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '', '"');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '–', '-');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '—', '-');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '—', '-');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '’', ''');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '‘', ''');
UPDATE `table` SET `FIELD` = REPLACE(`FIELD`, '', ''');