views:

24

answers:

1

Hi Guys, I am trying to read some text from a plist file and display it to the users in alert box.

When I build the string using this code, everything works (users sees Hello with a smily icon):

NSString *hello = @"Hello \ue415";

but when I get the string from plist, using this code, uses sees "Hello \ue415":

NString *hello =  (NSString *)[pageLiteratureDic objectForKey:litratureKey];

Do I have to encode string differently? Any help or pointers will be much appreciated... everyone love emojis ;)

A: 

In the plist, instead of "Hello \ue415" try using the smily face character explicitly as in "Hello :)". Just cut and paste the smily character over the unicode code. The reading of the plist is probably escaping the backslash and stopping the interpretation as a unicode character.

No one in particular
I dont think thats the case, I am able to print Hello \ue415 to NSLog...also noting happens when I cut and paste the smily character nothing happens :(
When you paste the smily face into the plist file and read it are you getting an empty string or are you seeing the \ue415 characters again?
No one in particular