feat: update the reporting of file encoding issues #1410
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit changes the errors and warnings reported when EPUBCheck detects an invalid or non-recommended file encoding.
The following errors codes are now reported:
RSC-027
(new): warning reported for XML documents encoded in UTF-16RSC-028
(new): error reported for XML documents in an invalid encodingHTM-058
(new): error reported for XHTML encoded in UTF-16 (the HTML standard has an authoring requirement for UTF-8)CSS-003
(updated): warning reported for CSS encoded in UTF-16CSS-004
(updated): error reported for CSS in an invalid encodingNote: previously both
CSS-003
andCSS-004
were errors, reported for a disallowed encoding. The only difference is that one was reported when the encoded was detected from a BOM, the other from a@charset
declaration.This commit repurposes
CSS-003
as the warning raised for UTF-16, andCSS-004
as the disallowed-encoding error.Fixes #1245