Figure out how to handle strings at the API boundary #5
Labels
discuss before start
The issues isn't quite ready to be fixed, there are open questions to be discussed
enhancement
New feature or request
help wanted
Extra attention is needed
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.
The text was updated successfully, but these errors were encountered: