5 ms·
Rust strings enforce utf-8 encoding, yes. However, it seems Windows (which uses utf-16) allows ill-formed UTF-16, in particular it tolerates unpaired surrogates
by bjkchoy 3y ago
Rust strings enforce utf-8 encoding, yes. However, it seems Windows (which uses utf-16) allows ill-formed UTF-16, in particular it tolerates unpaired surrogates.
You can read more here http://simonsapin.github.io/wtf-8/ http://simonsapin.github.io/wtf-8/