I am fetching posts from the Tumblr API & am running into an encoding issue with the returned "body" of the "post". All apostrophes are replaced by something that looks lượt thích "aETM".
I am trying lớn use:utf8_decode($string)
But all that does is replace the occurrences of "aETM" with a "?".
Bạn đang xem: 如何用php 用外观相似的ascii 字符替换utf
Bạn sẽ xem: Utf8 decode phpYeah that worked thanks. Can you explain why utf8_decode doesn't work? – Jon Rubins Aug 1 "12 at 23:21 utf8_decode converts UTF-8 strings khổng lồ ISO-8859-1 (a.k.a. Latin1) strings.
Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details & share your research!
But avoid …Asking for help, clarification, or responding khổng lồ other answers.Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.Post Your Answer Discard