do safe conversion from utf8

If invalid char sequences are found, replace them as "?" rather than
failing.