Fix failures in big endian machines - #8851
Merged
Merged
Conversation
sithlord48
requested review from
nbolton and
sithlord48
and removed request for
sithlord48
August 12, 2025 13:49
sithlord48
requested changes
Aug 12, 2025
sithlord48
self-requested a review
August 12, 2025 14:21
nbolton
approved these changes
Aug 12, 2025
Member
|
Some kind of transient CI deps issue on Windows. Re-running. |
nbolton
enabled auto-merge (rebase)
August 12, 2025 15:49
12 tasks
feishengfei
pushed a commit
to feishengfei/deskflow
that referenced
this pull request
Sep 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8850, #8203
This patch fixes the issues that were introduced because of endianness.
So, what this patch does is:
WORDS_BIGENDIANmacro in the CMakeLists.txt to check for endianness.doUTF16ToUTF8anddoUTF32ToUTF8UCS2ToUTF8_kUCS2a wide character is being used which has a size of 4 bytes or 2 bytes depending on the implementation. So, going inside to the code,doUCS2ToUTF8is expecting the input array to be having 16-bit elements before thereinterpret_castand that is not the case with operating systems other than Windows. So, I can see that the test case was expecting"h\0e\0l"on Linux (or anything other than Windows). But this is also an endian sensitive testcase as"h\0"in little endian machines will become"\0h"in big endian.