Input was getting mangled when it was in UTF-8