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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:57:32+00:00 2026-06-11T02:57:32+00:00

This could be a duplicate question, but I have no idea what search terms

  • 0

This could be a duplicate question, but I have no idea what search terms to look up, so don’t be hard on me if it has been asked before (and I’m pretty sure it was).

So I am getting a web page’s source code using the WebClient class and saving the entire string in the source variable:

var client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
var data = client.OpenRead(urlAddress);
var reader = new StreamReader(data);
var source = reader.ReadToEnd();
data.Close();
reader.Close();

Now I want to process certain text ranges from the source variable, especially user posted messages. Now the problem is that in the web pages source “&” is actually &, “‘” is ’ and quotes (“) are either –, “, ” and who knows what else.

Well, I could replace those codes with the actual symbols using the Replace string method, but I would like to know if there is a way to convert all those codes to the actual (expected) symbols. Is there a method that can do that, or maybe a library or some utility class on the Internet?

  • 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-11T02:57:33+00:00Added an answer on June 11, 2026 at 2:57 am

    Try using HttpUtility.HtmlDecode or HttpServerUtility.HtmlDecode.

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

Sidebar

Related Questions

This could be considered a duplicate question, as a similar one has already been
This could be an amazingly dumb question, but .... I don't think a standard
I know this question could have passed a few times here but I haven't
This may be duplicate question but I could not find one on SO. If
This could quite possibly be the dumbest question ever asked. Our client wants us
First, I acknowledge the possibility that this question could be a duplicate; just let
OK, this must be a duplicate question, but I cannot find the answer: I
This might be a duplicate question as I have found a few that are
I have a question very similar to this one but the answer does not
I did a search around and couldn't find this already asked but I'm sure

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.