Red dot marker BitBucket diff view
There is an option in IntelliJ IDEA you can use - the Remove BOM
option from the file context menu.
I investigated on this issue all the weekend and came the conclusion that we shouldn't be worried about this, nor should you if you're facing the issue, and you probably are if you're reading this.
Here are all my test cases and related results :
- Same piece of code on fresh BitBucket install => ð´
- Same piece of code on GitHub => no ð´
- New C# file created with VSCode in BitBucket => no ð´
- New C# file created with Visual Studio 2017 in BitBucket => ð´
- New C# file created with Visual Studio 2017 in GitHub => no ð´
We were really worried about this, we were thinking that our source migration introduced an encoding issue and that we'll face an encoding hell in the future between old and newly created files.
But the test with a freshly created C# file indicated that VS2017 introduces this ZWNBSP char in all files. Therefore it should not be a problem in the future since it is the expected operation for a VS2017 source file.
So, conclusion is, BitBucket shows this ZWNBSP with a red dot that scares when GitHub shows nothing, I think BB could at least change the dot color.
I had red dots in diffs in bitbucket on xml files coming from VS2017 project.
Red dot represents the Unicode code point U+FEFF (\ufeff
) Byte Order Mark (BOM). In my case when I edited a xml UTF-8 file in Visual Studio it added BOM sequence to the beginning of the file.
It is possible to remove BOM (red dot) by resaving a file in Visual Studio without signature. Open file in VS (2017) then File -> Save As. On Save button there is a drop down option 'Save with Encoding'
It defaults to 'Unicode (UTF-8 with signature)'. Change to 'Unicode (UTF-8 without signature')
git diff will see the removal of \ufeff
your file is encoding in UTF-8-BOM open your file with notepad++, change encoding to encode in UTF-8. encode in UTF-8