I'm reading the word Αθήνα
from a table which is utf8_unicode_ci encoded and can display it without problem on a utf-8 HTML page. i scrape some more greek and also this is shown correctly. now i want to write the information back to the database in another utf8 table. but the results are this: ?????
or Î?θήνα
(when i use utf8_encode() on it).
I also set
$this -> mysqli->set_charset("utf8");
What am I doing wrong, this is driving me crazy? Any help appreciated thx a lot!
its basically
read out:
$result = $this -> mysqli->query("SELECT * FROM `A` WHERE `country_code` = 'GRC'");
/* Tell browser to use UTF-8 */
header("Content-Type: text/html; charset=utf-8");
/* The actual scrape loop, done for every found entry in the urls table*/
while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
$this -> urls_array[] = $row;
}
write back:
$deal=$this -> urls_array[$key];
$this -> mysqli->query("INSERT INTO `B` (`city_name`,`title`....)
VALUES (
'{$deal["city_name"]}',
'{$title}'
)
");