-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix encoding of NfcProtocol.cs #2055
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@pgrawehr possibly we need to rebase or make some artificial change so that your changes get picked up? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@jdbruner I think no-bom should be the default, if it's not, it's most likely incorrect :-) |
@krwq I didn't notice this earlier, but something changed in my environment and I started getting a build error complaining about it. Frankly I'd prefer no BOM. However, the .editorconfig does specify UTF-8 with BOM. |
it sounds editor config is setup incorrectly |
No, this is on purpose. The bom guarantees correct encoding. We have several source files where the correct encoding is critical, as they contain non-ascii characters. Without the bom marker, it's likely some editors will get it wrong. |
@pgrawehr I think at dotnet/runtime at least we've established no-BOM around 2015 as default because at this point UTF-8 is the standard and everything else is mostly some old relic. We should make sure we pick one and stick with it and AFAIK it's UTF-8 no BOM everywhere. |
@krwq At the moment, we have it everywhere, and I did have bad experiences when it was missing, so we shouldn't change it unless we see a reason. But let's discuss in the next call. |
BOM is mainly used to check byte order - distinguish between little and big endian but UTF-8 doesn't have this problem. Also most Unix tools do not produce it and many don't expect it. Let's discuss it but this has already established pattern across dotnet/ repos... |
Mea culpa.
Card/NfcProtocol.cs was created with the wrong encoding (was utf8, should be utf8bom)
Microsoft Reviewers: Open in CodeFlow