I am using facebook API to get data from facebook like this:
$me = $facebook->api('/me');
$name = utf8_decode($me['name']);
The Correct name has to be: Gábriš
Without utf8_decode, the result is: Gábriš
And if I use utf8_decode, the result is incorrect again : Gábri?
Anyone has any clue?
Thanks
Then you are not using UTF-8 for your page (or wherever you are using this value) – because Facebook does return all data in UTF-8.
utf8_decode decodes to ISO-8859-1 – which does not contain some of the characters in the original name, so this is total nonsense.
What are you actually trying to achieve? What encoding are you using for your page? If it’s not UTF-8 (which in general for pages on the web it should be), try the iconv functions to transcode it to whatever encoding you are using (provided this one can represent those characters).