Working on W3C Encoding Sniffing Algorithm