I\'m having a problem with UTF8 encoding in my asp.net mvc 2 application in C#. I\'m trying let user download a simple text file from a string. I am trying to get bytes arra
UTF-8 does not require a BOM, because it is a sequence of 1-byte words. UTF-8 = UTF-8BE = UTF-8LE.
In contrast, UTF-16 requires a BOM at the beginning of the stream to identify whether the remainder of the stream is UTF-16BE or UTF-16LE, because UTF-16 is a sequence of 2-byte words and the BOM identifies whether the bytes in the words are BE or LE.
The problem does not lie with the Encoding.UTF8
class. The problem lies with whatever program you are using to view the files.