mattbasta/amo-validator — comment on commit 497862cc0c7bf1031a8734acf4eea1932285a3f1
File:  line 0
By kumar303:

The ordering of checking the different BOM values is wrong https://github.com/mattbasta/amo-validator/blob/497862cc0c7bf1031a8734acf4eea1932285a3f1/validator/unicodehelper.py#L6 UTF8 should be the last one to check because the UTF16 BOM is identical to UTF8 in the first couple bytes. This is the order that worked for me: https://github.com/mozilla/zamboni/commit/d476408b6eb11a1888952a5a4c75822eb8ef0fba#L1R195