Save Arabic text into MySQL database

后端 未结 2 1053
北海茫月
北海茫月 2021-01-28 02:31

I have this Arabic text: الخط الكوفي. When I try to save it in a MySQL database it doesn\'t save.

Is there any way to save it as the original text?

相关标签:
2条回答
  • 2021-01-28 03:05

    I'd take a look at the mysql docs for Character Sets. The default character set latin1 most likely doesn't handle the characters you're trying to use. You'll have to switch your tables over to UTF-8 if you want to store that properly.

    0 讨论(0)
  • 2021-01-28 03:06

    Make sure your MySQL instance and tables are set to take UTF-8, not latin1.

    Section 9.1 of the manual covers this.

    0 讨论(0)
提交回复
热议问题