我将波斯语Wikipedia 2007的转储文件导入了本地mysql 5.6。似乎非拉丁脚本中的用户名未正确保存。有什么办法解决吗?

 select DISTINCT rev_user_text from revision where rev_user_text  like '%?%';

+-------------------------------+
| rev_user_text                 |
+-------------------------------+
| 1?1?                          |
| ?                             |
| ? ?                           |
| ? ? ?                         |
| ? ????                        |
| ?. ?????????                  |
| ?.????                        |
| ?.???????                     |
| ?.????????                    |
| ??                            |
| ?? ??                         |
| ?? ?? ??                      |
| ?? ???                        |
| ?? ??? ???                    |
| ???                           |
| ??? 110                       |
| ??? ?                         |
| ??? ???                       |
| ??? ??? ( ?? ??? )            |
| ??? ??? ????? ???             |
| ??? ????                      |
| ??? ???? ???                  |
| ??? ???? ?????                |
| ??? ???? ???????              |
| ??? ?????                     |
| ??? ????? ???                 |
| ??? ????? ????                |
| ??? ????? ??????              |
| ??? ?????1984                 |
| ??? ??????                    |
| ??? ???????                   |
| ??? ??????? ???               |
| ??? ????????                  |
| ??? ??????????                |
| ???76                         |
| ????                          |
| ???? 32                       |
| ???? ?                        |
| ???? ??                       |
| ???? ?? ? ?????               |
| ???? ???                      |
| ???? ??? ? ????? ????         |
| ???? ??? ????                 |
| ???? ??? ?????                |
| ???? ??? ????? ?????          |
| ???? ????                     |
| ???? ???? ???                 |
| ???? ???? ??? (??????)        |
| ???? ???? ????                |
| ????.???                      |
| ????22                        |
| ????4183                      |
| ????777                       |
| ????808                       |
| ?????                         |
| ????? - ???? ???              |
| ????? 85 8                    |
| ????? ?                       |
| ????? ???                     |
| ????? ??? ???                 |
| ????? ??? ????                |
| ????? ????                    |
| ????? ???? (????? ????)       |
| ????? ???? --????? ????       |
| ????? ???? -????? ????        |
| ????? ???? ???                |
| ????? ???? ????               |
| ????? ???? ??????             |
| ????? ?????                   |
| ????? ????? ????              |
| ????? ????? ?????             |
| ????? ????? ????????          |
| ????? ??????                  |
| ????? ?????? ???              |
 …….

最佳答案

可能您没有使用合适的字符集,例如utf8。
尝试使用以下方法重新创建表:

CREATE TABLE revisions
(...)
CHARACTER SET 'utf8';


或更改现有表的字符集:

ALTER TABLE revisions
CHARACTER SET 'utf8';

10-04 12:14