I am trying to turn this text:
×וויר. העתיד של רשתות חברתיות והתקשורת ×©×œ× ×•
Into this text:
Since the issue was a MySQL fault with double-encoded UTF8 strings, MySQL is the right way to solve it.
Running the following commands will solve it -
mysqldump $DB_NAME -u $DB_USER -p -h $DB_HOST.EXAMPLE.NET --add-drop-table --default-character-set=latin1 > export.sql - latin1 is used here to force MySQL not to split the characters, and should not be used otherwise. cp export{,.utf8}.sql - making a backup copy.sed -i -e 's/latin1/utf8/g' export.utf8.sql - Replacing the latin1 with utf8 in the file, in order to import it as UTF-8 instead of 8859-1.mysql $DB_NAME -u $DB_USER -p -h $DB_HOST.EXAMPLE.NET < export.utf8.sql - import everything back to the database.This will solve the issue in about ten minutes.