I think you are right, from the spec:

"Since C# uses a 16-bit encoding of Unicode code points in characters
and string values, a Unicode character in the range U+10000 to U+10FFFF
is not permitted in a character literal and is represented using a
Unicode surrogate pair in a string literal. Unicode characters with code
points above 0x10FFFF are not supported"

-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Robin Debreuil
Sent: Tuesday, July 06, 2004 1:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] escaped string to char

I think things are a bit murky there in the spec and implementation
here.
Any number above 0xFFFF isn't supported in the long \Uxxxxxxxx tag
style,
eg:

   char c1 = '\U0000FFFF'; // ok
   char c2= '\U00010000'; // error CS1012: Too many characters in
character
literal

Chars are stored as 16 bit literals, but I'm not sure if the long form
\U
style was/is supposed to just hold the high bits up to 0010FFFF
(probably),
or hold two surrogate characters...? Anyway, it doesn't seem to work for
much of anything at this point. Maybe they are just waiting for the dust
to
settle in the high character ranges a bit before tackling their todo
list
; ).

I guess I wasn't overlooking a char parse routine for escaped sequences
at
least - weird that isn't missed more often.

Cheers,
Robin

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to