So, when I use php functions (like htmlentities or mysql_escape_string), it shows me hieroglyphics insteed of normal text. If I don't use any function, it shows me normal text. So where can be a problem?
Have you checked the encoding standard expected by the functions, compared with the input you put in? UTF-8, ASCII, etc.