-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-130655: Add a test for big-endian MO files in gettext
#132469
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -115,6 +115,23 @@ | |||
0x62, 0x61, 0x72, 0x00, # Message data | |||
])) | |||
|
|||
|
|||
GNU_MO_DATA_BIG_ENDIAN = base64.b64encode(bytes([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is weird to use b64encode here, and then decode it back. In future we may use bytes literals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, thanks for the review!
Thanks @tomasr8 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…nGH-132469) (cherry picked from commit 474f296) Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
GH-133248 is a backport of this pull request to the 3.13 branch. |
MO files can be stored either in little or big-endian format. Which is which is dictated by the file header.
All our test MO files are currently little-endian. We should have at least one test with big-endian as well.
gettext
#130655