使用.gz格式的Unicode字符(阿拉伯语和库尔德语)还原MySQL DB [英] Restore MySQL DB with Unicode characters (Arabic and Kurdish) in .gz format

查看:84
本文介绍了使用.gz格式的Unicode字符(阿拉伯语和库尔德语)还原MySQL DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.gz格式的MySQL备份文件,该文件是由cPanel中的备份向导创建的. 通过备份向导完成还原后,即使我在PhpMyadmin中将排序规则更改为不同的UTF-8编码,也无法正确显示阿拉伯和库尔德字符的内容.

I have a MySQL backup file in .gz format that was created by the backup wizard in cPanel. When the restoration is done by the backup wizard, contents with Arabic and Kurdish characters do not show correctly, even though I changed the collation to different UTF-8 encoding in PhpMyadmin.

例如,数据库中的实际数据为: كامپىزانكۆ ,还原后显示的数据变为: بÙâزا ÙÙÛÛâ

For example, the real data in DB is : كامپى زانكۆ and the data showed after the restoring become to this : بÙâزاÙÙÛÛâ

推荐答案

这是一个相当普遍的问题,由创建和导出数据库时的编码方案不一致引起.这是解决问题的最简单方法:

This is a fairly common problem caused by inconsistent encoding schemes when creating and exporting the database. Here is the simplest way to solve it:

  1. 导入您的备份文件
  2. 再次导出,但使用latin1编码
  3. 手动编辑导出的文件,将所有出现的latin1更改为utf8.
  4. 导入编辑的文件.
  1. Import your backup file
  2. Export it again, but using latin1 encoding
  3. Manually edit the exported file, change all occurrences of latin1 to utf8.
  4. Import the edited file.

这篇关于使用.gz格式的Unicode字符(阿拉伯语和库尔德语)还原MySQL DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆