0
what is the correct way to create the database and tables in mysql 5.6 to meet Brazilian standards of characters?
my php version is 5.6 and I use the following information in the php file header
header('Content-Type: text/html; charset=utf-8');
and in html is like this
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
but every time I search for data in the database I need to use the functions
utf8_decode();
utf8_encode();
the database was created as follows Type:Innodb, Collation: utf8_general_ci, the way it was created is correct? or it is correct to use php’s utf8 functions to fix the accent problem?
It can be the encoding of your file, open it with Notepad++ to check if it is as utf-8 (no good).
– Augusto
yes I am using the gift-free Notepad++ and utf-8
– WMomesso
Try setting the charset on the connection as well. Here are some tips too, http://rmonte.com/acentuaca-no-php-e-mysql-com-utf-8/
– Augusto
@Augusto thanks for the tip did not know that I could set the charset by the connection, I will do the tests.
– WMomesso
Blz, here also a detailed explanation http://answall.com/questions/43193/d%C3%bavida-com-charset-iso-8859-1-e-utf8? noredirect=1&lq=1
– Augusto