JeremyCanada26 Posted November 7, 2010 Share Posted November 7, 2010 I'm getting data from a third party API and the first_name and last_name fields from this third party are sometimes not in english and they come out quite odd looking. Example... "first_name": "Pesh\u042fo", "last_name": "\u062d\u0633\u064a\u0646" How could I normalize that using PHP to make it readable again? Quote Link to comment https://forums.phpfreaks.com/topic/217974-how-do-i-convert-strange-fields-from-third-party-api-into-readable-english/ Share on other sites More sharing options...
Yucky Posted November 7, 2010 Share Posted November 7, 2010 Those are unicode characters. Try parsing it with the correct character set. See http://www.utf8-chartable.de/ Quote Link to comment https://forums.phpfreaks.com/topic/217974-how-do-i-convert-strange-fields-from-third-party-api-into-readable-english/#findComment-1131240 Share on other sites More sharing options...
JeremyCanada26 Posted November 30, 2010 Author Share Posted November 30, 2010 Is there an easy way to parse and do the replacement? Quote Link to comment https://forums.phpfreaks.com/topic/217974-how-do-i-convert-strange-fields-from-third-party-api-into-readable-english/#findComment-1141360 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.