dcramer/chardet — pull request #10 by dinorox (2013-10-20 15:19:52+00:00)
Title: Proper detection report to UTF-8 with BOM

Currently chardet return `'UTF-8'` for an UTF-8 with BOM file.
However open a BOM'ed UTF-8 file with UTF-8 codec will result in invalid unicode character `'\ufeff'` being part of the first file's line:
```python
f = io.open('utf8bom.file', encoding='UTF-8')
l = f.readline()
l
# output: u'\ufeff FILE_CONTENTS...'
```
Open the file with the correct codec `'UTF-8-SIG'` will free us of some trouble:
```python
f = io.open('utf8bom.file', encoding='UTF-8-SIG')
l = f.readline()
l
# output: u' FILE_CONTENTS...'
```

Some infos:
http://docs.python.org/2/library/codecs.html#encodings-and-unicode
http://stackoverflow.com/questions/17912307/u-ufeff-in-python-string