Got error 'invalid UTF-8 string at offset 6' from regexp