Merge pull request #12 from emmanuel-keller/master

Implements #4 and #7
Implements #13 - Add charset detection