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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:04:47+00:00 2026-05-30T05:04:47+00:00

I have Search on my site we frame the query and send in the

  • 0

I have Search on my site we frame the query and send in the Request and Response comes back from the vendor as JSON. The vendor crawls our site and capture the data from our site and send response. In Our design we are converting the JSON into java object using GSON. We use the UTF-8 as charset in the Meta.

I have a situation the response has some times Unicode encoding for the special characters based on the request. The browser is rendering this Unicode encoding for special characters in a strange way. How should i decode this Unicode encoding?

For example, for the special character ‘ndash’ i see in the response it encoded as ‘\u2013’

  • 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-30T05:04:48+00:00Added an answer on May 30, 2026 at 5:04 am

    To clarify the differences between Unicode and a character encoding

    Unicode

    • is an abstract concept aiming to identify all letters (currently > 110 000).

    Character encoding

    • defines how a character can be represending by a sequence of bytes
    • one such encoding is utf-8 which uses 1-4 bytes to represent a Unicode character

    A java String is always UTF-16. Hence when you construct a String you can use the following String constructor

    new String(byte[], encoding)
    

    The second argument should be the encoding the characters are in when the client are sending them. If you don’t explicilty define an encoding, you will get the default system encoding, which you can examine using Charset.defaultCharset();.

    You can manually set the default encoding as an argument when starting the JVM

    -Dfile.encoding="utf-8"
    

    Although rarely needed, you can also employ CharsetDecoder/CharsetEncoder.

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

Sidebar

Related Questions

I have a search functionality on my site that is accessible from every page.
We have a simple search on our site that uses MySQL fulltext search and
I have a simple search form (site/search.php) to send search string to controller and
I have a site search (using Examine & Razor) that breaks if a space
I have a search box on my site and i need to replace all
I have a search form on my site that submits the url in the
i have a search page in my site, where user can search all the
I have a search box on my site. If a student enters some text,
I have a search page on my MVC site that contains a list of
I have signed up(paid) for Google site search. They have me a url of

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.