fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. Console.WriteLine("One to Four hex digits via \\x: W\x9W, X\x09X, Y\x009Y, Z\x0009Z");
  8. Console.WriteLine("");
  9. Console.WriteLine("Always four hex digits via \\u: TAB\u0009TAB");
  10. Console.WriteLine("");
  11.  
  12. Console.WriteLine("Unicode-only BMP character: (\\x) \x0F02 (\\u) \u0F02");
  13. Console.WriteLine("");
  14.  
  15. Console.WriteLine("Two UTF-16 Code Units (i.e. Surrogate Pair) via \\x: \xD83D\xDC7E");
  16. Console.WriteLine("Two UTF-16 Code Units (i.e. Surrogate Pair) via \\u: \uD83D\uDC7E");
  17. Console.WriteLine("");
  18.  
  19. Console.WriteLine("Code Point / UTF-32 via \\U: \U00000F02");
  20. Console.WriteLine("Code Point / UTF-32 via \\U: \U0001F47E");
  21. Console.WriteLine("");
  22.  
  23. Console.WriteLine("Highest Code Point / UTF-32 via \\U: \U0010FFFF");
  24. Console.WriteLine("-------------------");
  25.  
  26. Console.WriteLine("\\xA1 followed by a ...");
  27. Console.WriteLine("..non-alphanumeric character ([space]): \xA1 A");
  28. Console.WriteLine("..non-hex digit (Z): \xA1Z");
  29. Console.WriteLine("..hex digit, but intended to be used as itself (A): \xA1Ay, caramba!");
  30. // \xA1Ay returns "ਚy" instead of "¡Ay" because \xA1A produces U+0A1A
  31.  
  32. Console.WriteLine("\\x00A1 followed by a hex digit (A): \x00A1Aye aye, Captain!");
  33. }
  34. }
Success #stdin #stdout 0s 131520KB
stdin
Standard input is empty
stdout
One to Four hex digits via \x: W	W, X	X, Y	Y, Z	Z

Always four hex digits via \u: TAB	TAB

Unicode-only BMP character: (\x) ༂   (\u) ༂

Two UTF-16 Code Units (i.e. Surrogate Pair) via \x: 👾
Two UTF-16 Code Units (i.e. Surrogate Pair) via \u: 👾

Code Point / UTF-32 via \U: ༂
Code Point / UTF-32 via \U: 👾

Highest Code Point / UTF-32 via \U: 􏿿
-------------------
\xA1 followed by a ...
..non-alphanumeric character ([space]): ¡ A
..non-hex digit (Z): ¡Z
..hex digit, but intended to be used as itself (A): ਚy, caramba!
\x00A1 followed by a hex digit (A): ¡Aye aye, Captain!