开发者

codeigniter-mysql and persian insertion

开发者 https://www.devze.com 2023-04-12 17:08 出处:网络
i am using Codeigniter and mysql . when i insert a persian string in开发者_如何转开发to mysql via codeIgniter code, \'?\' will store in field per character.

i am using Codeigniter and mysql . when i insert a persian string in开发者_如何转开发to mysql via codeIgniter code, '?' will store in field per character.

what is wrong?

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


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


The problem is not with Codeigniter ,Actually some functions in codeigniter are just parsers. But it makes it easier ,

0

精彩评论

暂无评论...
验证码 换一张
取 消