Converting string to utf8 before compare