https://bugs.winehq.org/show_bug.cgi?id=51346
Bug ID: 51346 Summary: x264guiEx partly shows white box characters when using Wine-Mono (default encoding issue with C++/CLI). Product: Wine Version: 6.11 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mscoree Assignee: wine-bugs@winehq.org Reporter: sagawa.aki+winebugs@gmail.com Distribution: Ubuntu
Created attachment 70202 --> https://bugs.winehq.org/attachment.cgi?id=70202 x264guiEx configuration window
x264guiEx[1] is a famous output plugin for AviUtl, Japanese video editing software[2]. When running it with AviUtl 1.10 and Wine-Mono 6.20, its configuration window partly shows white box characters instead of Japanese characters. See attached image for details.
It's not typeface issue. For the attachment case, it shows three white boxes for two Japanese characters, なし. If we had have a missing typeface, it should be two.
I guess Wine-Mono's default encoding incompatibility causes this issue. This plugin uses System::String without the encoding parameter in frmConfig.cpp[3]. That means constructor's argument is interpreted using default encoding[4].
[1] https://github.com/rigaya/x264guiEx [2] http://spring-fragrance.mints.ne.jp/aviutl/ [3] https://github.com/rigaya/x264guiEx/blob/9f1abe0f44be3c602ffa938e2ca7d80cea4... [4] https://docs.microsoft.com/en-us/dotnet/api/system.string.-ctor?view=net-5.0...
https://bugs.winehq.org/show_bug.cgi?id=51346
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
https://bugs.winehq.org/show_bug.cgi?id=51346
--- Comment #1 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 70203 --> https://bugs.winehq.org/attachment.cgi?id=70203 test case for Encoding.Default.
This a test case for Encoding.Default. It shows CodePage, WebName and EncodingName property.
How to use: 1. If your 'locale -a' doesn't show ja_JP.utf8, add Japanese locale support to your environment. 2. Run encoding.exe on Japanese locale with wine, i.e. LANG=ja_JP.UTF-8 wine encoding.exe
Expected behavior: Shows 932, shift_jis, 日本語 (シフト JIS) This means the default encoding is code page 932.
Actual behavior: Shows 65001, utf-8, Unicode (UTF-8) This means the default encoding is code page 65001.
https://bugs.winehq.org/show_bug.cgi?id=51346
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- Ah right, I started working on this at some point.
The trouble I ran into is that Mono doesn't support most of the possible ANSI encodings you would get on Windows.
https://bugs.winehq.org/show_bug.cgi?id=51346
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- Despite the documentation, the implementation does not depend on Encoding.Default: https://github.com/mono/corefx/blob/9174bbeb7e1e4d3dc51f4f82243cbf4c62c61efa...
There is already an implementation based on CP_ACP, but I guess Mono takes the !PLATFORM_WINDOWS path which hard-codes UTF8. I haven't needed to fork corefx yet, and I'd like to continue to avoid that if I can. Maybe I can get away with defining PLATFORM_WINDOWS for the win32 mscorlib.dll, it doesn't seem to be used in many places. It would also change event logging to use win32.
https://bugs.winehq.org/show_bug.cgi?id=51346
--- Comment #4 from Esme Povirk madewokherd@gmail.com --- Fix pushed: https://github.com/madewokherd/wine-mono/commit/9c67b5e5fab59cf050c29d018885...
https://bugs.winehq.org/show_bug.cgi?id=51346
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|x264guiEx partly shows |x264guiEx partly shows |white box characters when |square characters when |using Wine-Mono (default |using Wine-Mono (default |encoding issue with |encoding issue with |C++/CLI). |C++/CLI).
--- Comment #5 from Sagawa sagawa.aki+winebugs@gmail.com --- Using develop branch, wine-mono-6.2.0-21-g9f38db6, I can confirm that x264guiEx's square characters are gone. Thanks, Esme. I'm looking forward the next wine-mono release.
If I have an issue caused by Encoding.Default in actual applications, I'll submit another report.
https://bugs.winehq.org/show_bug.cgi?id=51346
--- Comment #6 from Esme Povirk madewokherd@gmail.com --- CI build for completeness: https://github.com/madewokherd/wine-mono/actions/runs/987294206
CI tests failed in MonoTests.System.StringTest:TestSbytePtrConstructorDefault which checks that this constructor matches Encoding.Default. I'm choosing to ignore it for now, but it will be a convenient test case when fixing Encoding.Default.
https://bugs.winehq.org/show_bug.cgi?id=51346
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |451a54bc7a77b8b816f28ad1c61 | |5745e650586ae
--- Comment #7 from Esme Povirk madewokherd@gmail.com --- Fixed in Wine Mono 6.3.0.
https://bugs.winehq.org/show_bug.cgi?id=51346
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.14.