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

  • Home
  • SEARCH
  • 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 8409023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:47:37+00:00 2026-06-09T23:47:37+00:00

I am trying to decode a name string which contains apostrophe. This name string

  • 0

I am trying to decode a name string which contains apostrophe. This name string is being parsed in an XML parser, so what I want to do is that the apostrophe should be displayed normally, rather than being displayed as '. I tried using the URLDecoder.decode(myString, "UTF-*"); to decode it but to no avail. From one solution posted on StackOverflow I found that we need to use the URLDecoder.decode() twice. However, even that is not working. The code that I am using is:

try {
        temp = URLDecoder.decode("Wing's", "UTF-8");
        nameOrg = URLDecoder.decode(temp, "UTF-8");
    } 
catch (UnsupportedEncodingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

At the end it should display Wing's as Wing's, but it is displaying the same string. Any help would be great. Thanks in advance.

  • 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-09T23:47:38+00:00Added an answer on June 9, 2026 at 11:47 pm

    Why don’t you just decode it using Html.fromHtml(String source),

    Spanned temp = Html.fromHtml("Wing's");
    Log.d("decoded", temp.toString());
    

    Output – Wing’s

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

Sidebar

Related Questions

I came across this problem when trying to decode json into an array ,
I'm trying to put together something to decode a Json string and not having
I'm trying to do this in Python: 'Fi\xc3\xb1a'.decode('utf-8') I expect the result to be
In this code: soup=BeautifulSoup(program.Description.encode('utf-8')) name=soup.find('div',{'class':'head'}) print name.string.decode('utf-8') error happening when i'm trying to print
I am trying to send a encoded string to Solr and then decode it
I've been trying to find out why this 'json_encode'd string isn't parsing out correctly,
I'm trying to decide if I want to use name__iexact=name or name=name.lower() in a
I have three textfields (ID,Name,Address) which reflects columns in DB table i'm trying to
I'm trying to make a simple settings script, which basically send a setting name
Trying to decode an invalid encoded utf-8 html page gives different results in python,

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.