Skip to content
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

Update all calls to XDocument.Save to use an XmlTextWriter without a UTF-8 BOM encoding. #381

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

ahsonkhan
Copy link
Contributor

Attempt at fixing #380, if the issue is valid for the project :)

cc @danielpalme

@@ -386,7 +388,10 @@ public void CreateSummaryReport(SummaryResult summaryResult)

Logger.InfoFormat(Resources.WritingReportFile, targetPath);

result.Save(targetPath);
using (var writer = new XmlTextWriter(targetPath, new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not super familiar with the project layout. Is there a good place to cache this UTF8Encoding so that I can use it everywhere without having to create it repeatedly each time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants