Hmmm, none of the functions are taking &[u8]s, so invalid UTF-8 string will be rejected when the C pointers are read from and converted into Strings. Unless I misunderstood and you wanted something else, we can probably close this?
If C doesn't reject bad UTF-8, and Rust does, then that's a potential difference in behaviour.
We could avoid this issue by making both C and Rust check that all directory documents are ASCII (#18938 (moved)), or that they are all UTF-8. We have a proposal for making directory documents UTF-8.