When I do
WebClient wc = new WebClient();
string content = wc.DownloadString(url);
File.WriteAllTe开发者_StackOverflow社区xt(path, content);
And I open the file in path
with Internet Explorer, special characters like ó apear like ó.
Is there a way for interpreting correctly those characters?
You're downloading it in whatever content encoding is specified, but then saving it as UTF-8. If you want to save it to disk anyway, I suggest you use WebClient.DownloadFile
directly instead. Then so long as the encoding is also specified in the HTML (correctly) it should be okay.
精彩评论