HtmlAgilityPack - How to set custom encoding when loading pages

前端 未结 3 344
春和景丽
春和景丽 2021-01-17 04:44

Is it possible to set custom encoding when loading pages with the method below?

HtmlWeb hwWeb = new HtmlWeb();
HtmlDocument hd = hwWeb.load(\"myurl\");
         


        
3条回答
  •  粉色の甜心
    2021-01-17 05:32

    A decent answer is over here which handles auto-detecting the encoding as well as some other nifty features:

    C# and HtmlAgilityPack encoding problem

提交回复
热议问题