mysql- ???? question marks in data

Published by

Posted on March 29, 2008

After moving restoring my data I notice i was had some ???? question marks . The character set and collation was incorrect .

For my example the character setis utf8 and the collation is utf8_persian_ci

set name uts8

ALTER TABLE tbl_name
    [[DEFAULT] CHARACTER SET charset_name] [COLLATE collation_name]

http://dev.mysql.com/doc/refman/5.0/en/charset-table.html

http://www.bluetwanger.de/blog/2006/11/20/mysql-and-utf-8-no-more-question-marks/

http://en.wikipedia.org/wiki/Persian_language

alter db
ALTER DATABASE `dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin