Hacker News new | ask | show | jobs
by cygx 4028 days ago
I assume midipix uses the same approach as Scheme 48, Racket and Rust[1] to deal with ill-formed UTF-16?

[1] https://simonsapin.github.io/wtf-8/

1 comments

Actually no... the application makes all calls using utf-8, and is expected to provide it in a well-formed manner so that the system call layer could convert it to utf-16. In the reverse route, where utf-16 is read by the system call layer and then converted to utf-8 (getdents(2) and friends), it is expected that file names be in well-formed utf-16. For a file-system volume to have ill-formed utf-16 name entries would make for an interesting case... have not encountered that yet, but will certainly look into that.