POV-Ray : Newsgroups : povray.off-topic : Lots of statistics : Re: C# WTF list Server Time
29 Jul 2024 16:31:10 EDT (-0400)
  Re: C# WTF list  
From: Invisible
Date: 15 Aug 2012 05:46:51
Message: <502b700b@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.