UTF-8 does not work when inserting data [duplicate]

0

I use utf-8 when inserting the nome field in PHP , like this:

$nome = utf8_encode(strtolower($nome));

When checking how insert is before entering, the word is correct, but when accessing the database after insertion, the word is unconfigured. I would like to know what I am doing wrong, since I have already tried to change the bank to utf-8 and still insert wrong.

Thank you in advance!

    
asked by anonymous 07.06.2017 / 22:15

1 answer

0

Through the comments I researched how to do set names with mysqli and looked like this:

mysqli_query($conexao, "set names 'utf8'");

Correctly inserted accents into the bank.

    
08.06.2017 / 20:19