dongnao6858 2011-03-05 12:10
浏览 19

emailtodb PHP类不适用于阿拉伯字符

I am trying to use this class. It works fine, and I'm receiving the email, but it doesn't work with Arabic characters. How can I solve this problem?

  • 写回答

1条回答 默认 最新

  • dongping6974 2011-03-05 16:04
    关注

    If you used the SQL provided by the library author without modification, that's probably the source of your problem. The table definitions given exclude all character set information. This means that MySQL will use whatever default character set it's been configured for. Unfortunately the default configuration uses one of the Latin variants by default (and then dares to call it Swedish).

    You will need to change the character set for the tables, after which you might get better results. You will almost certainly need to set character sets on each table and on the connection itself.

    Also, you might want to find another library. The code given is clearly ancient and is poorly documented. It doesn't seem to go through any steps to ensure that character sets are treated properly, though it's far more likely that the database is more at fault here than not. (Worse, it uses addslashes for SQL escaping, which is basically the most utterly horrible level of protection possible against SQL Injection.)

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度