I m loading an external xml file .
I m getting some node values,output em in html as a select form and save these plus a text input by the user into mysql.
The characters inserted to mysql are greek.
I use the utf8 meta in my html head, the “SET NAMES utf-8” after my sql connection in php,utf-8 encoding in my notpad++ editor and also utf-8_general_ci in my table.Note here that when dtbs was created collation was latin and i manually changed it to utf8.Everything is passed correctly to mysql.
Till now i had a function that was generating an xml according to my selection.The xml’s node names and values where equal to the mysql query.Works perfect for english chars but when it comes to greek i get only question marks(“?”) printed. Also, i have already included the utf8 option to the new domdocument call.
Any idea on what should i do to get the greek characters on my xml?
Thanks in advance.
Solution:
mysql_set_charset did the work.
I missed the difference between collation and charset witch is defined here:
Character Sets and Collations in General