Code refactoring. Add utf8 encoding
Merge pull request #331 from asvitenkov/master

Code refactoring. Add utf8 encoding