[rust-dev] unicode support and core
kevin at atkinson.dhs.org
Fri Jan 6 22:32:21 PST 2012
On Fri, 6 Jan 2012, Evan Martin wrote:
> On Sat, Dec 24, 2011 at 2:03 AM, Rust <rust at kudling.de> wrote:
> From these sorts of experiences I've concluded the best strategies for
> these sorts of APIs is to provide two forms: a simple
> lowercase/uppercase that only works with ASCII but clearly works in
> that way -- for example, only define it for the 'byte' type (or
> however you represent non-Unicode characters), and then punt the rest
> off into a monster library like ICU.
Note that UTF-8 is backwards compatible with ASCII. Thus, ASCII-only
functions such as tolower are safe to use on a UTF-8 string.
More information about the Rust-dev