Search code examples
mysqlsqlsqlitearabic-support

Arabic doesn't show properly in SQLite after conversion from MySQL


I have a huge MySQL database. it's full of Arabic text, one of the tables' info can be shown here:

enter image description here

I used this program to convert it to an SQLite db file, however, after conversion, the letters appear in messed up way:

enter image description here

Also, I tried to view the exported file using 'SQLite Database Browser', and it was the same messed up behavior. needles to say it was the same in Android.


Solution

  • I've come to a conclusion, the program I used wasn't good at handling Arabic, so instead,

    • I exported each table as a CSV file using HeidiSQL.

    • Then I created a new SQLite3 database using DB Browser.

    • Then I re-imported the new CSV files as tables, and Arabic was imported Successfully.

    needless to say, in each of these steps I made sure to always use UTF-8 encoding in importing/exporting.