Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
lifthrasiir
on July 23, 2020
|
parent
|
context
|
favorite
| on:
Rust explained using easy English
Because char's range has a hole from 0xd800 to 0xd8ff (surrogate pairs [1]) so not all u16 values (or larger) can be safely converted to char.
[1]
https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF
ChrisSD
on July 23, 2020
[–]
Additionally Unicode only goes up to U+10FFFF (1,114,112 code points) which is far short of a full 32 bits (4,294,967,295 values).
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
[1] https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF