[Bug 57540] New: unrecognized charset 'SHIFT_JIS' when running Wine with LC_ALL=ja_JP.SJIS
https://bugs.winehq.org/show_bug.cgi?id=57540 Bug ID: 57540 Summary: unrecognized charset 'SHIFT_JIS' when running Wine with LC_ALL=ja_JP.SJIS Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs(a)winehq.org Reporter: zsolt_vadasz(a)protonmail.com Distribution: --- Some older visual novels require using the Japanese Shift JIS locale, which has to be generated via `localedef` (at least on Linux Mint and Artix Linux). I generated mine as such (following this[0] Wine forum post): ``` localedef -c -f SHIFT_JIS -i ja_JP ja_JP.SJIS ``` But when running the game's installer (after logging out and in for the changes to take effect), Wine gives an unrecognized charset error: ``` $ LC_ALL="ja_JP.SJIS" wine ./Setup.exe err:environ:init_unix_codepage unrecognized charset 'SHIFT_JIS' ``` This is because in dlls/ntdll/unix/env.c, the `charset_names` array's entry for Shift JIS is wrong. As can be seen in the command, and in $I18NPATH/charmaps (/usr/share/i18n/charmaps on my system), The gzip-compressed character map file is called `SHIFT_JIS.gz` instead of `SJIS.gz`. This is solved by changing the `name` from "SJIS" to "SHIFTJIS" in the array element. Tested on 448fcbc0c60d7228ed52f1f5d90f62be0a58289a [0]: https://forum.winehq.org/viewtopic.php?p=110966&sid=e1b934de7663eedec41e66e4... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 --- Comment #1 from Rafał Mużyło <galtgendo(a)o2.pl> ---
Some older visual novels require using the Japanese Shift JIS locale
Sorry, but that sounds fishy. Sure, quite a few Japanese games/programs needs to be run in the Japanese locale, but the charset req seems wrong. Any examples that don't work under ja_JP.utf8 ? (though I'm not disputing the validity of the patch - that's a separate matter) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Mint -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 --- Comment #2 from Rafał Mużyło <galtgendo(a)o2.pl> --- Also, both values might be wrong, as in that /usr/share/i18n/charmaps directory proper Windows Japanese charmap is WINDOWS-31J (aka CP932). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 --- Comment #3 from Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> --- (In reply to Rafał Mużyło from comment #1)
Some older visual novels require using the Japanese Shift JIS locale
Sorry, but that sounds fishy. Sure, quite a few Japanese games/programs needs to be run in the Japanese locale, but the charset req seems wrong.
Any examples that don't work under ja_JP.utf8 ?
(though I'm not disputing the validity of the patch - that's a separate matter)
To clarify, I'm still trying to get the game installed, as apparently `LC_ALL`, `TZ`, japanese system time and keyboard layout still aren't enough to avoid region lock errors. "require using the Japanese Shift JIS locale" means here that I had the least amount of garbled characters (still not zero!) with this character set, and Ghidra was only able to find relevant strings (that appear in the installer and the region lock error itself) when searching for Shift_JIS encoded data. The installer in the example is for a VN from DLsite. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 --- Comment #4 from Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> --- (In reply to Rafał Mużyło from comment #2)
Also, both values might be wrong, as in that /usr/share/i18n/charmaps directory proper Windows Japanese charmap is WINDOWS-31J (aka CP932).
Wikipedia says that's an extended variant of Shift_JIS though? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 --- Comment #5 from Rafał Mużyło <galtgendo(a)o2.pl> --- In a random order:
The installer in the example is for a VN from DLsite.
Most games on dlsite have demos. Again, I'm asking for at least one example where ja_JP.utf8 doesn't work, cause right now I'm expecting this to be a system configuration problem.
Wikipedia says that's an extended variant of Shift_JIS though?
What's named in that dir (and in a few other places) as Shift_JIS and CP932 *mostly* match, but the keyword is 'mostly'.
and Ghidra was only able to find relevant strings
Well, duh. If it wasn't a Unicode app, then as a Japanese Windows app it most likely *was* using CP932 (pretty much had to - while historically some Japanese apps (mostly mail clients) might have used a different encoding on the output, internally CP932 was pretty much obligatory) and (as above) those *mostly* match.
To clarify, I'm still trying to get the game installed, as apparently `LC_ALL`, `TZ`, japanese system time and keyboard layout still aren't enough to avoid region lock errors.
A Japanese IME, sure, if text input is required; keyboard layout not so much. Japanese time/date format, possible, but that's covered by LC_TIME (so overridden by LC_ALL); timezone not so much (potentially possible in extreme cornercases (some online multiplayer games) but very unlikely). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 --- Comment #6 from Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> --- (In reply to Rafał Mużyło from comment #5)
In a random order:
The installer in the example is for a VN from DLsite.
Most games on dlsite have demos. Again, I'm asking for at least one example This one actually doesn't have a demo. where ja_JP.utf8 doesn't work, cause right now I'm expecting this to be a system configuration problem. I've just tried on a different machine (running Artix) and ja_JP.UTF-8 worked this time. Big oops on my end, although I'm not sure why I kept getting garbled characters on my other system...
To clarify, I'm still trying to get the game installed, as apparently `LC_ALL`, `TZ`, japanese system time and keyboard layout still aren't enough to avoid region lock errors.
A Japanese IME, sure, if text input is required; keyboard layout not so much. Japanese time/date format, possible, but that's covered by LC_TIME (so overridden by LC_ALL); timezone not so much (potentially possible in extreme cornercases (some online multiplayer games) but very unlikely). I ended up using a community patch, installed fine afterward.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 F H <francisco278herrera(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |francisco278herrera(a)gmail.c | |om --- Comment #7 from F H <francisco278herrera(a)gmail.com> --- (In reply to Zsolt Vadasz from comment #6)
(In reply to Rafał Mużyło from comment #5)
In a random order:
The installer in the example is for a VN from DLsite.
Most games on dlsite have demos. Again, I'm asking for at least one example This one actually doesn't have a demo. where ja_JP.utf8 doesn't work, cause right now I'm expecting this to be a system configuration problem. I've just tried on a different machine (running Artix) and ja_JP.UTF-8 worked this time. Big oops on my end, although I'm not sure why I kept getting garbled characters on my other system...
To clarify, I'm still trying to get the game installed, as apparently `LC_ALL`, `TZ`, japanese system time and keyboard layout still aren't enough to avoid region lock errors.
A Japanese IME, sure, if text input is required; keyboard layout not so much. Japanese time/date format, possible, but that's covered by LC_TIME (so overridden by LC_ALL); timezone not so much (potentially possible in extreme cornercases (some online multiplayer games) but very unlikely). I ended up using a community patch, installed fine afterward.
Patch for the game or for wine? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 --- Comment #8 from Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> --- (In reply to F H from comment #7)
(In reply to Zsolt Vadasz from comment #6)
(In reply to Rafał Mużyło from comment #5)
In a random order:
The installer in the example is for a VN from DLsite.
Most games on dlsite have demos. Again, I'm asking for at least one example This one actually doesn't have a demo. where ja_JP.utf8 doesn't work, cause right now I'm expecting this to be a system configuration problem. I've just tried on a different machine (running Artix) and ja_JP.UTF-8 worked this time. Big oops on my end, although I'm not sure why I kept getting garbled characters on my other system...
To clarify, I'm still trying to get the game installed, as apparently `LC_ALL`, `TZ`, japanese system time and keyboard layout still aren't enough to avoid region lock errors.
A Japanese IME, sure, if text input is required; keyboard layout not so much. Japanese time/date format, possible, but that's covered by LC_TIME (so overridden by LC_ALL); timezone not so much (potentially possible in extreme cornercases (some online multiplayer games) but very unlikely). I ended up using a community patch, installed fine afterward.
Patch for the game or for wine? A patch for the game.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #9 from Zsolt Vadasz <zsolt_vadasz(a)protonmail.com> --- Fixed in 1f23d8934832a2a7e07db77d4d46cb6a206ddd94 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1f23d8934832a2a7e07db77d4d4 | |6cb6a206ddd94 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=57540 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 10.4. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla