I am trying to load a webpage for a windows phone app using the htmlagilitypack, the problem is that the encoding is iso-8859-7 and the htmlWeb class loads the page as a utf. I try to solve this with the following code:
public auditPage()
{
InitializeComponent();
HtmlWeb hwWeb = new HtmlWeb();
hwWeb = new HtmlWeb
{
AutoDetectEncoding = false,
OverrideEncoding = Encoding.GetEncoding("iso-8859-7"),
};
HtmlWeb.LoadAsync("url", HtmlWeb_load);
}
But i get the following errors : 'HtmlAgilityPack.HtmlWeb' does not contain a definition for 'OverrideEncoding' 'HtmlAgilityPack.HtmlWeb' does not contain a definition for 'AutoDetectEncoding'. What can i do to encode the html page correctly ?
Autodetectencoding was added in one of the latest versions and is maybe not available in the version you've added to the project. Version 1.4.0 has this property.