0

in my app, i send a data encoding with NSNonLossyASCIIStringEncoding (for emoji etc.), save it in the database and return it when is requested. When i receive the data, i use the same encoding and everything is ok.

But, if i have to send a push notification from the PHP file, i don't know how convert this encoding in a normal encoding..for example:

Original text: Hi guys {an emoji} ! รจ

Saved text (and after sent by push): Hi guys \ud83d\ude0a ! \350

Can you help me?! Thank you.

Community
  • 1
  • 1
Matteo Gobbi
  • 17,697
  • 3
  • 27
  • 41

1 Answers1

0

Usw NSUTF8StringEncoding instead of NSNonLossyASCIIStringEncoding.

See this SO answer

Community
  • 1
  • 1
zaph
  • 111,848
  • 21
  • 189
  • 228