Log in

View Full Version : Resolved utf8 read from file



ggalan
02-24-2012, 10:53 PM
i am trying to read from a long list of files that are in my directory then process this list. when utf8 characters, the list comes out like this:
l’Été that show up like this ��t�

heres an example of what i have
http://bit.ly/zQrQns

this didnt do anything


$str = "l’Été";
utf8_decode($str);
echo $str;



re: utf8_encode fixed it

traq
02-25-2012, 08:51 PM
Make sure (in order of importance):

1. Your data is UTF-8 encoded (this includes your database, if applicable).
2. Your server is sending utf-8 headers.
3. Your HTML has utf-8 meta tags.

numbers 1 and 2 are the most common problems. (Number 2 especially - if your server sends headers specifying a different encoding, the browser will try to use that encoding, even if the meta tag says "utf-8".)