fork(3) download
  1. namespace TEST2
  2. {
  3. class MainClass
  4. {
  5. public static void Main (string[] args)
  6. {
  7. System.Console.WriteLine(System.Console.OutputEncoding);
  8. System.Console.WriteLine(System.Console.Out.Encoding);
  9. System.Console.OutputEncoding = System.Text.Encoding.UTF8;
  10. System.Console.WriteLine(System.Console.OutputEncoding);
  11. // the following property is not UTF8 in Mono
  12. System.Console.WriteLine(System.Console.Out.Encoding);
  13. // http://i...content-available-to-author-only...e.com/xF3pP
  14.  
  15. // edit : 2011-03-16
  16. // maybe this method use underlying TextWriter
  17. // acquired through System.Console.Out.
  18. //the TextWriter's Encoding property is US-ASCII,
  19. //so it replaces the non-ASCII character in the string with U+003F QUESTION MARK
  20. System.Console.WriteLine("あ");
  21.  
  22. }
  23. }
  24. }
  25.  
Success #stdin #stdout 0.01s 36944KB
stdin
Standard input is empty
stdout
System.Text.ASCIIEncoding
System.Text.ASCIIEncoding
System.Text.UTF8Encoding
System.Text.ASCIIEncoding
?