Windows: force UTF-8 code page for app and samples #2951
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.
See https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
This should make Windows behaviour almost identical to *nix w.r.t UTF-8 everywhere, and simplifies/improves on the "wmain" wrapper solution.
NB: bumps minimum requirement to Windows 10 1903 (w/ 5th gen Broadwell HW cca 2015 and later), as well as building using UCRT only (default for MSVC for a while already; for MSYS2 this means UCRT64 or CLANG64 environments; cross-building from Ubuntu/Fedora is suspended due to missing UCRT toolchains).
Could be left in the backlog until these changed requirements are deemed to be acceptable.
(This doesn't address the missing wchar_t API in the library in any way - clients would expected to run in the UTF-8 code page as well.)