mysql set charset
Kategorie: mysql,apache,php

mysql_query("SET character_set_results=utf8");

MySQL_Query("SET NAMES 'cp1250'")


http://www.php.net/manual/en/function.iconv.php

echo 'Original : ', $text, PHP_EOL;
echo 'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text), PHP_EOL;
echo 'IGNORE : ', iconv("UTF-8", "ISO-8859-1//IGNORE", $text), PHP_EOL;
echo 'Plain : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL;

Nebo změnit default-character-set a poté importovat znovu


12.3.2021 20:54:11