Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are those characters at the beginning of Visual Studio auto-generated files?

When Visual Studio generates, e.g., a C# source file, if you edit it in an ASCII text editor, you'll see something that looks like the following character sequence:



Deleting these bytes doesn't seem to harm anything, but why are they put there in the first place?

like image 847
Buggieboy Avatar asked Oct 15 '25 00:10

Buggieboy


1 Answers

This is a byte order marker (BOM). It is used to indicate the encoding of the file.

More info:

  • http://en.wikipedia.org/wiki/Byte-order_mark
like image 118
JaredPar Avatar answered Oct 17 '25 12:10

JaredPar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!