Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

codeigniter-mysql and persian insertion

i am using Codeigniter and mysql . when i insert a persian string into mysql via codeIgniter code, '?' will store in field per character.

what is wrong?

for example : 'سلام' ---> '????'


1 Answers

Is your table created with utf8 characterset? Did you call mysql_set_charset to change the charset to utf8 before executing your query?

Read

  • UTF8, PHP and MySQL
  • Does your PHP/MySQL Speak Unicode
like image 195
Muhammad Hasan Khan Avatar answered Feb 12 '26 15:02

Muhammad Hasan Khan