https://bugs.winehq.org/show_bug.cgi?id=52223
Bug ID: 52223 Summary: activeCodePage utf-8 in application manifest not respected Product: Wine Version: 6.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: fusion Assignee: wine-bugs@winehq.org Reporter: terinjokes@gmail.com Distribution: ---
Starting[1] with Windows 1903 (Windows 10 May 2019 update), Windows has allowed applications to opt-in to supporting the UTF-8 code page by defining "activeCodePage" in their application manifest. When in this mode, the "ANSI" -A WinAPI functions operate in UTF-8 mode.
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
WINE, even when winver is set to "win10", does not respect this application manifest key, resulting in the application starting with a legacy code page.
This can cause issues if the user expects to work with files or strings not supported in the active legacy code page. Often characters that cannot be represented in the code page are replaced by question marks.
I am using the staging release of 6.22.
[1]: https://docs.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-co...
Expectation:
When an application with activeCodePage set to "UTF-8" in the application manifest calls GetACP(), the number 65001 (CP_UTF8) is returned. Strings returned by WinAPI functions (eg, file paths) are encoded in UTF-8. Strings provided to WinAPI functions are UTF-8 and display appropriately in the UI.
Observed:
GetACP() returned a number representing a legacy code page (eg, 1252). Strings returned by WinAPI functions are in that code page. Characters that cannot be represented are replaced by question marks.
https://bugs.winehq.org/show_bug.cgi?id=52223
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Component|fusion |kernel32
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Confirming. Do you know of a specific application that depends on this?
https://bugs.winehq.org/show_bug.cgi?id=52223
--- Comment #2 from terinjokes@gmail.com --- There's a few applications I'm aware of that use this in their application manifest. Rufus uses it when displaying filenames in the UI. Cataclysm-DDA and Filmulator being cross-platform applications use it to display internationalized strings.
The application I'm working on, Mixere[1], uses this functionality to support UTF-8 to be able to open files with characters outside the legacy code page, and display UTF-8 strings in the UI.
As this is also the listed alternative to Boost.Nowide[2], so I would not be surprised to learn of more applications in the future.
[1]: https://github.com/terinjokes/mixere [2]: https://www.boost.org/doc/libs/master/libs/nowide/doc/html/index.html#altern...
https://bugs.winehq.org/show_bug.cgi?id=52223
--- Comment #3 from terinjokes@gmail.com --- Created attachment 71308 --> https://bugs.winehq.org/attachment.cgi?id=71308 Mixere on Windows 1809, showing pre-1903 behavior.
https://bugs.winehq.org/show_bug.cgi?id=52223
--- Comment #4 from terinjokes@gmail.com --- Created attachment 71309 --> https://bugs.winehq.org/attachment.cgi?id=71309 Mixere on Wine 6.22, showing the same pre-1903 behavior
https://bugs.winehq.org/show_bug.cgi?id=52223
--- Comment #5 from terinjokes@gmail.com --- Created attachment 71310 --> https://bugs.winehq.org/attachment.cgi?id=71310 Mixere on Windows 21H2, where ACP gets set to 65001
https://bugs.winehq.org/show_bug.cgi?id=52223
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |967ef0bf41fc6742398313ebdeb | |d681c1b33dbc3 Resolution|--- |FIXED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- activeCodePage is implemented now, marking fixed.
This will probably reveal bugs in other parts of Wine, please file new bugs for any remaining codepage conversion issues.
https://bugs.winehq.org/show_bug.cgi?id=52223
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 7.7.