Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9174951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:50:13+00:00 2026-06-17T16:50:13+00:00

I am working on an iPhone app which allows people to send messages with

  • 0

I am working on an iPhone app which allows people to send messages with Emoji icons. I saved the icon in Mysql with charset utf8mb4 and collation utf8mb4_unicode_ci, and all the emoji icons is saved correctly in my database. However, when I return json back to the client (php json_encode), the Emoji is encoded as something like this: ‘\ud83d\ude04’, and iPhone displays it as a square. However, if I return as XML, the Emoji Icon won’t become unicode like this: ‘\ud83d\ude04’, it will just be the icon.

I am wondering if this is an issue on my server, or on my client. If it is my client, how can object c decode it correctly.

Can someone please help?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:50:13+00:00Added an answer on June 17, 2026 at 4:50 pm

    "\ud83d\ude04" is the JSON Unicode escape sequence for U+D83D U+DE04, which is the “surrogate pair” for the Unicode U+1F604 (SMILING FACE WITH OPEN MOUTH AND SMILING EYES).

    But NSJSONSerialization decodes this correctly, as can be seen in the following example:

    const char *jsonString = "{ \"emoji\": \"\\ud83d\\ude04\" }";
    NSLog(@"JSON: %s", jsonString);
    NSData *jsonData = [NSData dataWithBytes:jsonString length:strlen(jsonString)];
    NSError *error;
    NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error];
    self.myLabel.text = [jsonDict objectForKey:@"emoji"];
    NSLog(@"Emoji: %@", self.myLabel.text);
    

    Output:

    JSON: { "emoji": "\ud83d\ude04" }
    Emoji: 
    

    and the Emoji symbol is also displayed correctly (tested with iPhone device and Simulator).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on an iPhone app which uses CoreData to save some
I'm working on a phonegap iPhone app which downloads content from the network in
I am working on an iPhone app, in which I have to enlist all
I'm working on an iPhone app that offers the user the opportunity to send
i'm working on iphone app which will show 4 buttons in first view. on
I am working on an iPhone app which is using push notifications from a
I'm working on a iPhone app which has a pretty large UITableView with data
I'm working on an iPhone app in which I manage some kind of agendas.
I am working on an update for my new iphone app which will include
I am working on an iPhone app which involves using json-framework.I am getting array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.