Add encoding detection
Merge pull request #86 from odz/chardet

Add encoding detection