1

When .NET controls receive input from the keyboard and I output the code to a file (stream-write to it), is the content encoded in UTF-16 (Windows's default)? What about when I copy text from a UTF-32 database into .NET text controls, what is the result?

HelloWorld
  • 2,375
  • 5
  • 22
  • 21
  • may be you read this ,http://stackoverflow.com/questions/90838/how-can-i-detect-the-encoding-codepage-of-a-text-file?rq=1 – V-SHY Mar 09 '14 at 03:34
  • It is encoded into whatever Encoding you passed to the StreamWriter constructor. Default is utf-8 without a BOM. – Hans Passant Mar 09 '14 at 08:57

1 Answers1

1

I realise now that everything in the .NET Framework is in UTF-16 unless otherwise explicitly converted.

HelloWorld
  • 2,375
  • 5
  • 22
  • 21