vdf icon indicating copy to clipboard operation
vdf copied to clipboard

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

Open smcv opened this issue 2 years ago • 3 comments

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: https://github.com/ValvePython/vdf/issues/33

smcv avatar Dec 15 '23 13:12 smcv

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

smcv avatar Dec 15 '23 13:12 smcv

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

smcv avatar Dec 15 '23 13:12 smcv

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

smcv avatar Dec 15 '23 13:12 smcv