[Mono-list] unicode trouble

Pierre Arnaud pierre.arnaud@opac.ch
Tue, 10 Feb 2004 07:51:52 +0100


max wrote:
> Hi Gabor,
> I think you're confused. Characters in .NET are 16 bits BECAUSE they are
> unicode. 16 bits = 2 bytes = 65536 values.
> 
> a way to check that is simple. here's some C# example code:
> 
>       string s = "a";
>       s += (char)10300;

This should have been 0x10300 which cannot be stored in a "char" in .NET,
since char is 16-bit.

    Pierre