Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right. And the rust standard library provides (in my mind) the right API for this. Strings are always internally utf8. But they have constructor methods to create strings from UTF16 bytes, or utf32 or whatever.

Rust isn’t unique. Swift, Go and Python3 all expose more or less the same api. C’s standard library, with the benefit of hindsight, is uniquely terrible here.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: