I hope they will find a solution quickly.
I used http://www.phpclasses.org/browse/package/1360.html and the test page is working! The Greek characters from the database appear as it should.
I will try later to make the hook also.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Encode testing</title>
</head>
<body>
<?php
require_once "includes/ConvertCharset/ConvertCharset.class.php";
// Encode testing
mysql_connect('localhost:3304', 'user', 'pwd');
mysql_select_db('dbname');
// Read first 5 tickets
$sql = "SELECT id, tid, title, message FROM tbltickets LIMIT 5";
$res = mysql_query($sql);
// For each ticket
while(list($id, $tid, $title, $message) = mysql_fetch_array($res)) {
// Shows generic info for this ticket
echo "[$id] ";
echo "<strong>$title</strong><br />\n";
echo "<p><strong>Before</strong><br />$message</p>\n";
// Check if encoding is utf8
$enc = mb_detect_encoding($message, "UTF-8, ISO-8859-7");
if($enc!="UTF-8") {
$Entities = 0;
$FromCharset = $enc;
$ToCharset = "UTF-8";
$text = new ConvertCharset($FromCharset, $ToCharset, $Entities);
$message = $text ->Convert($message);
// and print fixed message
echo "<p><strong>After $enc</strong><br />$message</p>\n";
}
echo "<hr />\n";
}
?>
</body>
</html>