3 ms·
> It is unclear whether unpaired surrogate byte sequences are supposed to be well-formed in CESU-8. According to the Unicode Technical Report #26 that defines
by eridius 11y ago
> It is unclear whether unpaired surrogate byte sequences are supposed to be well-formed in CESU-8.
According to the Unicode Technical Report #26 that defines CESU-8[1], CESU-8 is a Compatibility Encoding Scheme for UTF-16 ("CESU"). In fact, the way the encoding is defined, the source data must be represented in UTF-16 prior to converting to CESU-8. Since UTF-16 cannot represent unpaired surrogates, I think it's safe to say that CESU-8 cannot represent them either.
[1] http://www.unicode.org/reports/tr26/ http://www.unicode.org/reports/tr26/
- SimonSapin 11y agoOn further thought I agree. https://github.com/SimonSapin/wtf-8/commit/51abeef717a161ba9eea9624cd0a040d15bdbe7b https://github.com/SimonSapin/wtf-8/commit/51abeef717a161ba9...