Skip to main content

problem encoding mysql 5.6

Comments

2 comments

  • FirasBenk
    Hello, I have found the probleme, it's in my php, not with my data base: when I try: $sql = 'INSERT INTO table VALUES ("accentu"")'; => it's ok but when I try: mysql_set_charset('utf8'); $test=utf8_decode( 'Texte accentu"' ); echo $test; $sql = 'INSERT INTO firas VALUES ("'.$test.'")'; => I have in my echo: accentu? and in my data base: accentu? How Can I force php to work with UTF8? I have add this in httpd.conf: AddDefaultCharset utf-8
    0
  • cPanelMichael
    Hello, You can change the "default_charset" value in /usr/local/lib/php.ini via: "WHM Home " Service Configuration " PHP Configuration Editor " Advanced Mode" Thank you.
    0

Please sign in to leave a comment.