Defining 4-byte UTF-16 character in a string
问题 I have read a question about UTF-8, UTF-16 and UCS-2 and almost all answers give the statement that UCS-2 is obsolete and C# uses UTF-16. However, all my attempts to create the 4-byte character U+1D11E in C# failed, so I actually think C# uses the UCS-2 subset of UTF-16 only. There are my tries: string s = "\u1D11E"; // gives the 2 character string "ᴑE", because \u1D11 is ᴑ string s = (char) 0x1D11E; // won't compile because of an overflow string s = Encoding.Unicode.GetString(new byte[]