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

Updating RTF Magic number to match https://www.iana.org/assignments/media-types/application/rtf #544

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

zdiff
Copy link
Contributor

@zdiff zdiff commented Jun 6, 2024

Updating RTF Magic number to match the following references:

It appears as though the version number is not required in a Rich Text Format header to create a readable rtf file.

However, these magic numbers seem to diverge from the official specification from Microsoft, that indicate a version number is required:

An entire RTF file is considered a group and must be enclosed in braces. The control word \rtf<N> must follow the opening brace. The numeric parameter <N> identifies the version of the RTF standard used. The RTF standard described in this RTF Specification, although titled as version 1.{0, 1, 2, 3, 4, 5, 6, 7, 8, 9.1}, continues to correspond syntactically to RTF Specification version 1. Therefore, the numeric parameter <N> for the \rtf control word should still be emitted as 1.
sources:

This PR increases the detection of Rich Text Format files that do not include a version number

Copy link
Owner

@gabriel-vasile gabriel-vasile left a comment

Choose a reason for hiding this comment

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

Thank you!

@gabriel-vasile gabriel-vasile merged commit 8329892 into gabriel-vasile:master Jun 18, 2024
5 checks passed
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