Enforcing locale character encoding type to en_US.UTF-8
Beautify code
Merge pull request #434 from ppp0/issue-434

Invalid byte sequence