|
![](/i/fill.gif) |
On 14/08/2012 03:42 PM, Invisible wrote:
> - The "char" type works with Unicode. Well done. Oh, but wait... It only
> stores 16 bits, and yet Unicode actually requires 24 bits to represent a
> single code-point. So this "Unicode character" only actually covers the
> Basic Multilingual Plane. FAIL!
Oh great. Apparently "char" doesn't store a code-point at all, it stores
a code-unit.
For anything in the BMP, these are effectively the same thing. For
anything outside that range, *you* must manually write the code to
decode UTF-16 into actual code-points (which then do not fit into a "char").
Well done. :-P
Post a reply to this message
|
![](/i/fill.gif) |