You should be able to make the request work by providing the following:
PHP Fit for UTF-8
, PHP, , UTF-8. UTF-8, . Firefox , , " ". , UTF-8 . UTF-8, . header(), :
header('Content-Type: text/html; charset=UTF-8');
meta head:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
MySQL UTF-8
, , UTF-8. , , . , , , . , , , :
SHOW VARIABLES LIKE 'character_set_system';
SHOW VARIABLES LIKE 'character_set_database';
:
(CREATE | ALTER) DATABASE ... DEFAULT CHARACTER SET utf8;
, , :
SHOW CREATE TABLE myTable;
, , :
(CREATE | ALTER) TABLE ... DEFAULT CHARACTER SET utf8;
, , . , . , UTF-8, alter :
ALTER TABLE ... CONVERT TO CHARACTER SET utf8;
! UTF-8 , . .
MySQLi UTF-8
, , , , , , UTF-8. :
$db = new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);
if(! $db->set_charset("utf8"))
{
printf("Error loading character set utf8: %sn", $db->error);
}
, , . , , 5 HTML: <, >, ', ", and &. htmlspecialchars().
( ), , . : : 1 : 2. !