correct handling of UTF-8 input
Merge pull request #1 from garretraziel/master

correct handling of UTF-8 input