How does chrome establish the right character-encoding?
问题 I've been working with a lot of charsets lately and I discovered a lot of issues when trying to establish the proper charset for a random web page. The charset can be set in the headers of the html document, or inside the <head> section, multiple times or sometimes the declaration is omitted. Despite these issues chrome dose a great job at setting the best charset every time. I've tried searching the sources but didn't manage to find anything as I don't know where to look. So my question is