3 ms·
On the topic of unpaired surrogates, that a problem WTF-8 (https://simonsapin.github.io/wtf-8/ https://simonsapin.github.io/wtf-8/) is intended to help solve.
by andrewaylett 7y ago
On the topic of unpaired surrogates, that a problem WTF-8 (https://simonsapin.github.io/wtf-8/ https://simonsapin.github.io/wtf-8/) is intended to help solve.
The spec was created for Servo/Rust, but it's a sane general internal representation that should let people interact with platform APIs in a lossless manner.
- masklinn 7y ago> On the topic of unpaired surrogates, that a problem WTF-8 (https://simonsapin.github.io/wtf-8/ https://simonsapin.github.io/wtf-8/) is intended to help solve. Yes. And it does so just fine. But you probably don't want your core string type to be that, so it's used as part of the "third way" where filenames are not strings, so that windows filename are relatively cheaply convertible to strings: by transcoding to wtf8 upfront, converting from filenames to strings is just UTF8 validation; and converting from UTF8 to filename is free. And likewise for "byte array" unix filenames.