2

I get a page response from a web and it is having strings like "Lluís Quílez". But i get it as "Lluís Quílez". So how do i change it back to "Lluís Quílez" in C#?

Thank you.

0

2 Answers 2

5

The string is HTML encoded. Use the HtmlDecode method:

s = System.Web.HttpUtility.HtmlDecode(s);
Sign up to request clarification or add additional context in comments.

Comments

2

Check out this outstanding article which might help you ;)

and an answer to a related question here.

4 Comments

I don't get why I was downvoted on this.. is there something wrong with my answer ? I'm relatively new here, maybe I'm missing something..
Don't worry about the downvotes, it happens from time to time. Sometimes people misuse downvotes if they don't agree with an answer. Anyway, good find of the duplicate question.
Not my downvote, but perhaps someone felt your first link to be not useful. This isn't a Unicode issue at all, really.
Maybe you're right with the Unicode, I just thought clarifying how encodings in web work wouldn't make any harm as an addition to the solution which is just one line of code ;) Anyway, thanks for your comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.