Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: How to set encoding when using HtmlAgilityPack.HtmlDocument.LoadHtml

$
0
0
Thread on SA : http://stackoverflow.com/questions/25395547/how-to-set-encoding-when-using-htmlagilitypack-htmldocument-loadhtml



I already have the source of HTML page so i am using
string html_page_source="bla bla some source";
HtmlDocument hdMyDoc = new HtmlDocument();
hdMyDoc.LoadHtml(html_page_source);
However i see not decoded characters such as
  
içerisinde 
göründüğünden çok
.
.
So how can i set auto decode at htmldocument ?

How can i set default encoding to solve this problem ?

And would this below method a good practice ?

hdMyDoc.LoadHtml(HttpUtility.HtmlDecode(html_page_source));

C# .net 4.5 latest , WPF application

Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>