Closed StefH closed 2 years ago
这是来自QQ邮箱的假期自动回复邮件。 您好,你的邮件已收到。 亮亮
Hello @StefH ,
While we 100% understand and can easily reproduce this issue, that's pretty much an easy answer: we will not fix this unless there is a major version.
This library is used by too many people/companies, and from my experience, every time we did a small change, even if it makes sense like this request, it breaks without a doubt some people's code, and we need to revert it.
You can get the right result by overriding the encoding such as:
var web = new HtmlWeb();
web.OverrideEncoding = Encoding.UTF8;
var doc = web.Load("https://www.mstack.nl");
var title = doc.DocumentNode.SelectNodes("//title");
but there is currently no chance it happens by default as explained unless we create a major version that will re-write the HAP
library, people expect that it works as it currently works.
Best Regards,
Jon
It's clear, thank you. I'll use your code.
1. Description
The default encoding in HtmlDocument is Encoding.Default which causes problems, better to just use UTF8 ?
2. Exception
3. Fiddle or Project
The title should actually be: Which is in html:
But when debugging the internals from HtmlWeb, it's:
Which looks like: