开发者

json decode non-utf-8 chars

开发者 https://www.devze.com 2023-03-23 21:56 出处:网络
Hi I\'开发者_运维知识库m getting all of a user\'s statuses from twitter in json and there are some non-utf-8 characters in there (some spanish). Was wondering how I can keep the non-utf-8 chars in tac

Hi I'开发者_运维知识库m getting all of a user's statuses from twitter in json and there are some non-utf-8 characters in there (some spanish). Was wondering how I can keep the non-utf-8 chars in tact when calling json_decode?

thanks!


Add this at the very top of your document

header("Content-Type:text/html; charset=UTF-8");

however "non-utf-8" characters is very odd chain of characters

0

精彩评论

暂无评论...
验证码 换一张
取 消