convert to utf-8 before regexp match