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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:59:11+00:00 2026-05-13T16:59:11+00:00

Sorry for asking basic questions here. Pardon me. I have a sequence a string

  • 0

Sorry for asking basic questions here. Pardon me.

I have a sequence a string in this in unicode as follows.

String unicode = "\u8BF7\u5728\u6B64\u5904\u8F93\u5165\u4EA7\u54C1\u7F16\u53F7\u6216\u540D\u79F0";

How can I convert this to Chinese text or the UTF-8 text ?

  • 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-13T16:59:11+00:00Added an answer on May 13, 2026 at 4:59 pm

    The String itself will always be in Unicode; I’m not sure what you mean by “convert this to Chinese text” but to convert it to the binary representation using UTF-8 you’d use:

    byte[] bytes = unicode.getBytes("UTF-8");
    

    or you can use the Charset – using the Guava library for example, you’d just use:

    byte[] bytes = unicode.getBytes(Charsets.UTF_8);
    

    (This gets round the brittleness of specifying a string, and avoids worrying about catching UnsupportedEncodingException.)

    Or you can declare:

    final static Charset UTF_8 = Charset.forName("UTF-8");
    

    at the top of your class to avoid a whole library as a cure for the string.

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

Sidebar

Ask A Question

Stats

  • Questions 490k
  • Answers 491k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Instead of referencing the pageNum variable directly, just get it… May 16, 2026 at 10:00 am
  • Editorial Team
    Editorial Team added an answer Here is a piece of code for adding a control… May 16, 2026 at 10:00 am
  • Editorial Team
    Editorial Team added an answer Both IN and OR will do a query for b… May 16, 2026 at 10:00 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Sorry for asking this question, but I searched all Java-related questions, but I got
Sorry for asking a basic question like this but I've been reading on this
Sorry guys, I've been running a mock asking questions on how to integrate wikipedia
I have a question regarding n-layer architecture. I thought long and hard before asking
Sorry if this has been asked, I am not sure how to best word
Sorry, this is quite a special topic so this may not be of interest
sorry for being dumb here, but I failed to see why these tools can
Sorry about this long block of code, but I think it makes sense to
I'm building a form where I need multiple optional inputs, what I have is
I know that title didn't make sense, Im sorry! Its hard to word what

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.