I am facing a paradox in decoding with utf8_encode
decode. I have a MySQL database with uft8 collation and whose fields have the utf8_general
coding. I have my php file in utf8, and in my HTML pages I have specified in the header the utf8 charset.
My problem is that when I select from my table a field containing accented characters (like èçò ùé) and echo that to the browser, I get strange characters.
To resolve my problem, I have to echo $description=utf8_encode($imm['description'])
.
My question is why can’t I do the echo directly without having to use uft8_encode
every time?