Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mlecho

macrumors newbie
Original poster
Mar 31, 2004
28
0
i am working with JSON queries. i have a bunch of european names that are coming back to me in a format i do no know how to encode. For example the name: Sébastien looks like S\U00e9bastien. How can i encode the accents, etc from my JSON results?
 
just to explore this more, do i need the opposite of stringByAddingPercentEscapesUsingEncoding and does that exist?

...reading the API now, but open to ideas
 
i am working with JSON queries. i have a bunch of european names that are coming back to me in a format i do no know how to encode. For example the name: Sébastien looks like S\U00e9bastien. How can i encode the accents, etc from my JSON results?

You have to know what encoding the server sending you the JSON info is using. Then you set your resulting string to that encoding. If it's a windows server it may be NSISOLatin1StringEncoding for instance.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.