问题
I have been parsing this website for my windows phone app using Html agility pack;
First I download it using webclient class and then give the result for HtmlDocument.
There was some problems with iso-8859-1 encoding but htmlentity.DeEntitize solved problems with letters Ö ä showing as Ö and ä...
But the document still has some scandinavian characters (äö) in some random encoding (which are showed as: �).
Those letters show perfectly using chrome.
site is: http://reittiopas.tampere.fi/mobile/fi/
回答1:
Windows Phone only support a small set of encodings, and iso-8859-1 is not one of them!
To solve this, just create the encoding handler with Silverlight Encoding Generator, convert the text, and then use HTML Agility Pack as you are now!
来源:https://stackoverflow.com/questions/10273083/html-agility-pack-parsing-website-encoding-iso-8859-1-really-annoying