简体   繁体   English

编码字符串C#

[英]Encoding string C#

I get a page response from a web and it is having strings like "Lluís Quílez" . 我从网络上收到一个页面响应,它包含类似"Lluís Quílez"字符串。 But i get it as "Lluís Quílez" . 但是我将其作为"Lluís Quílez" So how do i change it back to "Lluís Quílez" in C#? 那么,如何在C# "Lluís Quílez"其更改回"Lluís Quílez"

Thank you. 谢谢。

The string is HTML encoded. 该字符串是HTML编码的。 Use the HtmlDecode method: 使用HtmlDecode方法:

s = System.Web.HttpUtility.HtmlDecode(s);

Check out this outstanding article which might help you ;) 查看这篇出色的文章 ,可能会对您有所帮助;)

and an answer to a related question here . 并回答一个相关的问题在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM