Chris Hansen
Chris Hansen

Reputation: 8685

json decode non-utf-8 chars

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!

Upvotes: 1

Views: 527

Answers (1)

genesis
genesis

Reputation: 50982

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

Upvotes: 2

Related Questions