Skip to content

Fix invalid UTF-8#12443

Open
jeremybobbin wants to merge 1 commit intotianocore:masterfrom
jeremybobbin:fix-invalid-utf8-sequences
Open

Fix invalid UTF-8#12443
jeremybobbin wants to merge 1 commit intotianocore:masterfrom
jeremybobbin:fix-invalid-utf8-sequences

Conversation

@jeremybobbin
Copy link
Copy Markdown

Description

This patch fixes the invalid UTF-8 sequences which caused me some problems with CI(in the attempt to remove the carriage returns).

Some of the CI scripts(like the following) read the diff as UTF-8:

  • .pytool\Plugin\EccCheck\EccCheck.py
  • .pytool\Plugin\LicenseCheck\LicenseCheck.py

This means that if invalid UTF-8 was removed in a patch, it will raise an exception.

I do not anticipate this passing CI, however, if merged, it should prevent future CI problems.

  • Breaking change?
  • Impacts security?
  • Includes tests?

How This Was Tested

Tested with OVMF in QEMU. I ran the affected make files to assert that there were no new parsing errors. I built antlr & dlg with no issues.

Integration Instructions

N/A

Signed-off-by: Jeremy Bobbin <jer@jer.cx>
@spbrogan
Copy link
Copy Markdown
Member

we have a plugin that checks for this automatically across files in packages.
https://github.com/tianocore/edk2/tree/master/.pytool/Plugin/CharEncodingCheck

Could that be used somehow to not only catch these issues but prevent regressions?

At first glance i think there are two issues.

  1. Basetools isn't a "package". But maybe it should be somehow added to CI so that these tools can be run.
  2. These files are not standard file extensions and thus may not have a rule in the CharEncodingCheck tool.

Anyway, look forward to seeing if there is a way to avoid these problems coming back.

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