On Friday, May 26, 2017 at 10:01:18 AM UTC+3, Henri Sivonen wrote:
> >  Think of XML files without the "encoding" attribute in the declaration or 
> > HTML files without the meta charset tag.
> 
> Per spec, these must be treated as UTF-16 if there's a UTF-16 BOM and
> as UTF-8 otherwise. It's highly inappropriate to run heuristic
> detection for XML.
> 
> -- 
> Henri Sivonen
> https://hsivonen.fi/

Still, sometimes XML fragments come up and even if they are not 100% XML spec 
compliant i still have to process them. This includes encoding detection as 
well, when the XML declaration is missing from the fragments.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to