The problem is not the database. I do import it with utf8 and all pages are utf8 encoded plus i used the meta charset tag.
The problem is with one single line
$tplv['idformat'].= stripslashes(htmlspecialchars($row['title']));
and changed it to
$tplv['idformat'].= stripslashes(htmlspecialchars($row['title'], ENT_COMPAT, "UTF-8"));
but again nothing happens.
Also, when i edit a page(e.g. my welcome page) where i write greek letters, it displayed correctly.
If i edit it again , my greek letters (only in editing mode) are written like
& # and three numbers, all without spaces.