I'm reading a lot about UTF-8 and encoding but I'm lost,
I simply want to parse a string with a GET
/POST
in php and if it contains something else that UTF-8 to convert it (in my occasion Greek)
so my faulty code is:
$title = $_GET['title'];
//and sometimes I use this:
$info = htmlspecialchars(trim($_GET['info']));
echo $title, $info;
and it echoes λεξη λÎξη1
for some greek characters given (which is wrong of course).
Thanks
Update: Just wanted to update with my solution in case somebody reads this. The problem was just one line which was missing:
mysql_set_charset('utf8', $con);
With $con
of course handling the mysql_connect