microsoft/VirtualClient

Inconsitent presence of UTF-8 BOM at start of files with default git configuration on Linux

RobertHenry6bev opened this issue · 3 comments

Describe the bug
Inconsistent use of BOM at start of files. For example, 1078 .cs files in this repo, 868 have the BOM, the others do not. 920 .json files overall, 132 with the BOM

To Reproduce
find . -type f | grep '.cs$' | xargs file
and then examine output of file command for "BOM" (or not).

Expected behavior
Consistency.

I would remove the BOM altogether, but this will touch many files, and may introduce craziness when outstanding branches attempt to merge. The BOM is not recognized by the Linux file-system per-se, but is handled on a case by case basis. For example, the python json parser will fail on json files starting with the BOM, unless one specifies a different code point than default.

Thank you for fixing that. There are also ~100 .md (markdown files) that have BOM

Closing this as the md are also addressed. Reopen if you see other issue.