Charset error in Mysql

Asked

Viewed 22 times

0

Follows line of code in php with example:

If you do it like this, record it with those strange characters:

INSERT INTO cliente (nome, endereco) VALUES ('ççoas sadoçççç','email');

If you do that, you record normal:

INSERT INTO cliente (nome, endereco) VALUES (utf_utf8_decode('ççoas sadoçççç'),utf8_decode('email'));

I’ve already changed the charsets and collation the basis, connection and the php and nothing. Any suggestions?

  • Which IDE do you use? Recently I had this problem, the solution was to configure the IDE to write in the format UTF-8.

  • I use the eclipse and Notepad++ and tb already set the encoding and nothing.

  • I found the bug, made a "fine-tooth comb" and found that I had collected $Conn->exec('SET CHARACTER SET utf-8'); and the right thing is utf8. Thank you all.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.