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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:43:19+00:00 2026-05-24T08:43:19+00:00

I am trying to convert UTF-8 string into UCS-2 string. I need to get

  • 0

I am trying to convert UTF-8 string into UCS-2 string.
I need to get string like “\uFF0D\uFF0D\u6211\u7684\u4E0A\u7F51\u4E3B\u9875”.
I have googled for about a month by now, but still there is no reference about converting UTF-8 to UCS-2.
Please someone help me.
Thx in advance.

EDIT: okay, maybe my explanation was not good enough. Here is what I am trying to do.
I live in Korea, and I am trying to send a sms message using CTMessageCenter. I tried to send chinese simplified character through my app. And I get ???? Instead of proper characters. So I tried UTF-8, UTF-16, BE and LE as well. But they all return ??. Finally I found out that SMS uses UCS-2 and EUC-KR encoding in Korea. Weird, isn’t it?
Anyway I tried to send string like \u4E3B\u9875 and it worked.
So I need to convert string into UCS-2 encoding first and get the string literal from those strings.

  • 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-05-24T08:43:20+00:00Added an answer on May 24, 2026 at 8:43 am

    Wikipedia:

    The older UCS-2 (2-byte Universal Character Set) is a similar
    character encoding that was superseded by UTF-16 in version 2.0 of the
    Unicode standard in July 1996.2 It produces a fixed-length format
    by simply using the code point as the 16-bit code unit and produces
    exactly the same result as UTF-16 for 96.9% of all the code points in
    the range 0-0xFFFF, including all characters that had been assigned a
    value at that time.

    IBM:

    Since the UCS-2 standard is limited to 65,535 characters, and the data
    processing industry needs over 94,000 characters, the UCS-2 standard
    is in the process of being superseded by the Unicode UTF-16 standard.

    However, because UTF-16 is a superset of the existing UCS-2 standard,
    you can develop your applications using the systems existing UCS-2
    support as long as your applications treat the UCS-2 as if it were
    UTF-16.

    uincode.org:

    UCS-2 is obsolete terminology which refers to a Unicode
    implementation up to Unicode 1.1, before surrogate code points and
    UTF-16 were added to Version 2.0 of the standard. This term should now
    be avoided.

    UCS-2 does not define a distinct data format, because UTF-16 and UCS-2
    are identical for purposes of data exchange. Both are 16-bit, and have
    exactly the same code unit representation.

    So, using the “UTF8toUnicode” transformation in most language libraries will produce UTF-16, which is essentially UCS-2. And simply extracting the 16-bit characters from an Objective-C string will accomplish the same thing.

    In other words, the solution has been staring you in the face all along.

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

Sidebar

Related Questions

I am having issues with trying to convert an UTF-8 string to unicode. I
I'm trying to convert a string into money format using this function , and
I am trying to convert a C++ std::string to UTF-8 or std::wstring without losing
I'm trying to convert a string from iso-8859-1 to utf-8. But when I find
Trying to convert this c code into MIPS and run it in SPIM. int
I am trying to convert an ASP.NET website into a web application project. The
I am trying to convert an int into three bytes representing that int (big
Hi I'm trying to convert the XML file into associative array by using the
I'm trying to convert a hash to a XML-string with this module XML::Hash::LX but
i'm trying to print out a string of UTF-16 characters. i posted this question

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.