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

feat: update the reporting of file encoding issues #1410

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

rdeltour
Copy link
Member

@rdeltour rdeltour commented Dec 2, 2022

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-16
  • RSC-028 (new): error reported for XML documents in an invalid encoding
  • HTM-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-16
  • CSS-004 (updated): error reported for CSS in an invalid encoding

Note: previously both CSS-003 and CSS-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, and CSS-004 as the disallowed-encoding error.

Fixes #1245

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-16
- `RSC-028` (new): error reported for XML documents in an invalid encoding
- `HTM-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-16
- `CSS-004` (updated): error reported for CSS in an invalid encoding

Note: previously both `CSS-003` and `CSS-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, and
`CSS-004` as the disallowed-encoding error.

Fixes #1245
@rdeltour rdeltour added this to the v5.0.0-beta milestone Dec 2, 2022
@rdeltour rdeltour self-assigned this Dec 2, 2022
Base automatically changed from feat/unicode-normalization-check to release/v5.0.0 December 6, 2022 12:14
@rdeltour rdeltour merged commit 0d6f927 into release/v5.0.0 Dec 6, 2022
@rdeltour rdeltour deleted the feat/file-encoding-check branch December 6, 2022 14:35
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