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 8776949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:10:47+00:00 2026-06-13T19:10:47+00:00

At the moment I have the following unicode string stored in a database. \u4ece\u4e0b\u5468\u4e00\u8d77\uff0c\u5947\u5f02

  • 0

At the moment I have the following unicode string stored in a database.

\u4ece\u4e0b\u5468\u4e00\u8d77\uff0c\u5947\u5f02

If I send it out through php to the apple APNS server, it is displayed correctly on the iphones.
If I however want to display these characters (chinese characters) on a website, it does not display them in chinese characters but purely as \u4ece\u4e0b\u5468\u4e00\u8d77\uff0c\u5947\u5f02

Anyone can help me out how to display them correctly?

  • 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-13T19:10:48+00:00Added an answer on June 13, 2026 at 7:10 pm

    That’s not “Unicode”, those are Unicode escape sequences. This: “下” is a Unicode character. This: “\u4e0b” is the string “backslash you four ee zero bee”.1 If you put that escape sequence exactly like that into JSON, it happens to resolve to the correct characters when JSON is decoded. That’s because that escape sequence happens to be used in JSON. That hints at another problem though, which is that you are creating your JSON by hand like this:

    $apns = "{\"message\":\"$unicodeEscape\"}";
    

    Don’t do that. Make a native array in your programming language of choice and JSON-encode it:

    $apns = json_encode(array('message' => '从下周一起,奇异'));
    

    If you’d currently do this, the string would show up as “\u4ece…” on the iPhone as well, because the string content would get correctly JSON escaped to preserve its original content.

    To HTML, those escape sequences don’t mean anything special in the first place, they certainly don’t stand for Chinese characters.

    Store the actual Chinese characters in your database encoded in, for example, UTF-8, not an escape sequence which is only relevant in certain contexts.

    I’d recommend you read most articles on http://kunststube.net for more detailed information.


    Since they’re apparently JSON escapes, the easiest way to convert them back from the format they’re currently in should be to parse them as JSON:

    $string = json_decode("\"$string\"");
    

    That only works if the string doesn’t contain anything that would make the JSON syntax invalid of course, like a ". Otherwise, you can adapt this solution.


    1 (That string is also made up of “Unicode characters”, because each of these characters can be represented by Unicode.)

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

Sidebar

Related Questions

At the moment I have the following code which works fine. label = new
Okay, at the moment I have the following in my model: has_many :current_monitorings, :class_name
I have the following code: http://jsfiddle.net/uRCL2/1 At the moment the result is shown in
I just started using django for development. At the moment, I have the following
The following code summarizes the problem I have at the moment. My current execution
So at the moment I have a multidimensional array string[,] items = new string[100,
I have the following Stored Procedure, Im looking for the correct syntax so I
At the moment I have the following Command class: Public Class SubscribeCommand Implements ICommand
i am learning Java at the moment and have the following question: i am
At the moment I have the following MySQL query: SELECT COUNT(*) AS `count`, `v`.`value`

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.