1

I have a string in my Redis DB containing encoded chars with accents:

hum... probl\xc3\xa0me :(

This is string is correctly read from DB (using node-redis)

hum... problème :(

But when it is sent to client (iOS app), utf8 encoding appears.

UPDATE

After some hours of struggle, I figure this out.
The retrieval from DB is ok, then the transport to the client leads to those encoded chars to be added. On client side I then correct the values , based on this SOP answer

Community
  • 1
  • 1
Luc
  • 16,604
  • 34
  • 121
  • 183
  • how do you obtain your `NSString` ? –  Jan 09 '12 at 15:50
  • @vince I read it from a redis DB where it is saved as "hum... probl\xc3\xa0me" – Luc Jan 09 '12 at 15:56
  • I meant how do you end up with that string, no way for you to get the value in db ? –  Jan 09 '12 at 16:09
  • @vince. I have a process that write the string "hum... problème" in db. When I check the DB, I can see it was saved as "hum... probl\xc3\xa0me". So when I get this string back to my NSString I have the "hum... probl\U00c3\U00a8me" – Luc Jan 09 '12 at 16:14
  • Duplicate of: http://stackoverflow.com/questions/2099349/using-objective-c-cocoa-to-unescape-unicode-characters-ie-u1234 – Cyrille Jan 09 '12 at 16:27

0 Answers0