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

Treat UTF-16 strings in binary VDF as little-endian #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smcv
Copy link
Contributor

@smcv smcv commented Dec 15, 2023

Integers in binary VDF are already treated as little-endian (least significant byte first) regardless of CPU architecture, but the 16-bit units in UTF-16 didn't get the same treatment. This led to a test failure on big-endian machines.

Resolves: #33

Integers in binary VDF are already treated as little-endian (least
significant byte first) regardless of CPU architecture, but the 16-bit
units in UTF-16 didn't get the same treatment. This led to a test failure
on big-endian machines.

Resolves: ValvePython#33
Signed-off-by: Simon McVittie <[email protected]>
@smcv
Copy link
Contributor Author

smcv commented Dec 15, 2023

I still need to test this on a big-endian machine, I'll mark as non-draft after that.

@smcv
Copy link
Contributor Author

smcv commented Dec 15, 2023

The CI failures are expected, see #56 for fixes for those.

@smcv smcv marked this pull request as ready for review December 15, 2023 13:11
@smcv
Copy link
Contributor Author

smcv commented Dec 15, 2023

Verified to pass tests on a Debian-developer-accessible s390x (big-endian) machine.

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.

BinaryVDF.test_loads_utf16 not passed
1 participant