[Mono-list] Just to clarify it: strings in .NET are in UTF-16 not UCS-2

A Rafael D Teixeira rafaelteixeirabr@hotmail.com
Wed, 03 Oct 2001 14:23:53 -0300


C# code like this:

  string x = "\U00010001Test";
  foreach(char c in x.ToCharArray())
    System.Console.Write(" " + ((int)c).ToString("X4"));

When compiled with csc and run in MS runtime, will output:
D800 DC01 0054 0065 0073 0074

The first 2 'char's listed (D800 DC01), are the surrogate pair to specify 
32-bit character 0x10001.

Rafael Teixeira
Brazilian Developer


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp