jrubins jrubins - 1 year ago 162
PHP Question

UTF-8 Decode for php

I am fetching posts from the Tumblr API and am running into an encoding issue with the returned "body" of the "post". All apostrophes are replaced by something that looks like "aETM".

I am trying to use:


But all that does is replace the occurrences of "aETM" with a "?".

Any suggestions?

Answer Source


$string = mb_convert_encoding($string,'HTML-ENTITIES','utf-8');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download