Skip to content

New Windows Unicode solution, works on XP#335

Merged
Cyan4973 merged 2 commits into
Cyan4973:devfrom
easyaspi314:unicode-xp
Mar 13, 2020
Merged

New Windows Unicode solution, works on XP#335
Cyan4973 merged 2 commits into
Cyan4973:devfrom
easyaspi314:unicode-xp

Conversation

@easyaspi314

Copy link
Copy Markdown
Contributor

Now uses WriteConsoleW instead of vfwprintf. This is codepage independent and works on Windows XP.

Doing this also avoids the _O_U8TEXT hack.

Also use _vsnprintf instead of vsnprintf, as it is more consistent than vsnprintf in that it doesn't write the null terminator on truncation. Weird.

Some minor cleanup was done as well.

Now uses WriteConsoleW instead of vfwprintf. This is codepage
independent and works on Windows XP.

Doing this also avoids the _O_U8TEXT hack.
Helps when you set your guideline to the correct column.
@easyaspi314

Copy link
Copy Markdown
Contributor Author

Truly fixes #293.

unicode fixed

@sergeevabc

Copy link
Copy Markdown

Err… I’m a mere user without compiler. Could I have a binary to verify the fix, please?

@easyaspi314

Copy link
Copy Markdown
Contributor Author

@sergeevabc

Copy link
Copy Markdown

Oh, so many binaries, it makes me confused all the time. Right, I confirm that
xxhsum-i686-mingw-w64.exe and xxhsum-i686-mingw32.exe finally work as expected,
and report that xxhsum-i686-msvc2019.exe cannot be launched (XP says “not Win32 app”).

@easyaspi314

easyaspi314 commented Mar 10, 2020

Copy link
Copy Markdown
Contributor Author

I might have used the wrong filename, or MSVC builds just don't work with XP. I'll test in my VM later.

Edit: Forgot that MSVC sets the minimum version to NT 6.0 a.k.a. Vista. You need to add /link /SUBSYSTEM:CONSOLE,5.1 to support XP.

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.

3 participants