Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

 Appears at the beginning of my utf-8 text file when view as ANSI

Tags:

c#

utf-8

ansi

I have a text file and it uses utf-8, but when the users view it in ANSI unknown characters appear at the very beginning. I am using C#.

Thanks.

like image 843
Joe Avatar asked Feb 25 '10 07:02

Joe


1 Answers

This is a byte order mark. http://en.wikipedia.org/wiki/Byte_order_mark

The byte order mark (BOM) is a Unicode character used to signal the endianness (byte order) of a text file or stream.

like image 62
Foole Avatar answered Sep 22 '22 10:09

Foole