Skip to content

RFC: switch Windows to UTF-8 locale entirely #15899

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kmilos
Copy link
Contributor

@kmilos kmilos commented Dec 18, 2023

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.

NB: bumps minimum requirement to Windows 10 1903 (w/ 5th gen Broadwell HW cca 2015 and later as well).

TBD if this is for 4.8 or some future dt version, but the switch will address e.g. Exiv2 dropping wstring (other libs might follow at some point) and make L10N easier in the long run...

There's probably a few more places to check for wchar_t and -W API, and also double-check how CLI arguments are handled and if anything needs to change there (currently wmain wrapper and conversions are left in place).

Testers and feedback are welcome.

@kmilos kmilos added the scope: windows support windows related issues and PR label Dec 18, 2023
@kmilos kmilos force-pushed the kmilos/win_utf8_switch branch 5 times, most recently from edb3410 to 1b375a7 Compare December 18, 2023 17:08
@wpferguson
Copy link
Member

I wonder how many users are still on Win 7,8,8.1?

@kmilos
Copy link
Contributor Author

kmilos commented Dec 19, 2023

Depends on what source you use, but most estimates are tiny, in the 1% range:

https://gs.statcounter.com/os-version-market-share/windows/desktop/worldwide

https://www.pcbenchmarks.net/os-marketshare.html

In any case, this change doesn't seem to be working yet (at least for the CLI), so still some work to do...

@kmilos kmilos marked this pull request as draft December 19, 2023 08:10
@kmilos kmilos force-pushed the kmilos/win_utf8_switch branch from 1b375a7 to c011b07 Compare December 19, 2023 13:23
Copy link

This pull request has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please verify it has no conflicts with the master branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

@kmilos kmilos force-pushed the kmilos/win_utf8_switch branch from c011b07 to da510a7 Compare March 20, 2024 16:54
@kmilos kmilos force-pushed the kmilos/win_utf8_switch branch from da510a7 to 06fe2fb Compare March 21, 2024 16:11
@kmilos kmilos marked this pull request as ready for review March 21, 2024 18:15
@kmilos
Copy link
Contributor Author

kmilos commented Mar 21, 2024

@jsmucr Please test w/ exiv2 0.28 if you get a chance.

@kmilos kmilos force-pushed the kmilos/win_utf8_switch branch from 06fe2fb to 0f346a6 Compare March 22, 2024 08:01
@kmilos
Copy link
Contributor Author

kmilos commented Mar 25, 2024

Due to LibRaw/LibRaw#632, this also requires the patched 0.21.2-3 MSYS2 package (or later, and -DDONT_USE_INTERNAL_LIBRAW=ON of course).

If a new/fixed LibRaw submodule is not available upstream if/when this is to be merged, we can always switch only imageio_libraw.c back to wchat_t API.

Copy link

github-actions bot commented Jul 7, 2024

This pull request has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please verify it has no conflicts with the master branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

Windows 10 1903 is the first one supporting UTF-8 locales.
This also means Broadwell or equivalent  CPU from cca 2015.
Copy link

This pull request has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please verify it has no conflicts with the master branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-pr-activity scope: windows support windows related issues and PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants