Force encoding of string before calculating sha1
Fixes #3-utf8-problem