Modified fromUtf8 and fromLatin1 signatures.