how to modify the encoding of HtmlWeb

c# html-agility-pack windows-phone-7

Question

The issue is that the encoding is ISO-8859-7 and the htmlWeb class loads the page as a utf, and I'm attempting to load a website for a Windows Phone app. I use the following code to attempt to fix this:

 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 keep getting 'HtmlAgilityPack' issues. There is no definition for "OverrideEncoding" or "HtmlAgilityPack" in HtmlWeb. There is no definition for "AutoDetectEncoding" in HtmlWeb. What can I do to appropriately encode the HTML page?

1
1
4/1/2012 2:37:35 AM

Popular Answer

The most recent version includes autodetectencoding, which may not be included in the version you uploaded to the project. Version 1.4.0 has this feature..

Also see: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/b2733aa5-99dc-4bcc-a3b8-ea0754f494e0/

0
4/2/2012 11:57:14 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow