Figure out how to handle strings at the API boundary
Open
discuss before start
enhancement
help wanted
- Dominant language
- Rust
- Stars
- 140
- Forks
- 34
- Avg merge
- 5h 5m
- Merged PRs (30d)
- 4
Description
Nothing wrong here from a functionality point of view, but it raises questions about what is the best way to represent strings when interfacing with ICU. Many ICU APIs want UTF-16 strings but also accept UTF-8 strings. I've been toying with the idea of making a Rust version of UnicodeString that you can toggle between UTF-8 and UTF-16 at compile time. For now, I think the safest thing is for users to keep their strings in Rust-standard UTF-8, and only do the UTF-16 conversion at the API boundary. Even if you have to round-trip a few times between 8 and 16, I strongly suspect that this won't be a performance bottleneck.
Contributor guide
Assessment
This issue has not been assessed yet.