Fix encoding error #17
Merge pull request #20 from ZhukV/master

Fix detect encoding error