dongxing2692 2009-11-14 16:07
浏览 41

特殊字符不会以正确的方式插入到mysql表中

I have a mysql database which Im trying to submit values to through a php file from a form.

If I manually insert values to the table 'myTable' with special characters like the swedish åäö letters, it works fine.

But when I am trying to use 'INSERT INTO' after a form is submitted on my page, to insert values to the table, all special characters turn out weird... Like symbols...

All collations are set to utf-8-swedish!

NOTE1: If I echo the values 'POSTED' from the form submit, the special characters are shown proberly. So its not the php file or the form itself.

NOTE2: All documents are set to utf-8

Thanks

  • 写回答

3条回答 默认 最新

  • duanguan1573 2009-11-14 16:23
    关注

    Ensure with mysql_set_charset that the MySQL connection charset is UTF-8.

    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!