A B C D E F G H I J K L M N O P Q R S T U V W X Z
Ub Ut

UTF8 Daten (Arabisch, Hebräisch, Griechisch etc.) in eine MySQL Datenbank eingeben und auslesen

you must set charset in first connect with mysql by this query:

SET CHARACTER SET utf8

for example in mysqli functions

$MySQL_Handle = mysqli_connect(HOSTNAME,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME) 
or die ( mysqli_error($MySQL_Handle) ); 

$sSQL= 'SET CHARACTER SET utf8'; 

mysqli_query($MySQL_Handle,$sSQL) 
or die ('Can\'t charset in DataBase'); 

and PDO sample :

$dbh = new PDO('mysql:host=localhost;dbname=' . $DB_NAME, $DB_USER,
$DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"));
$dbh->exec("SET CHARACTER SET UTF8");

this action need before insert and before select.