RFR: 8291978: jpackage: allow to override primary l10n files on Windows [v3]
Alex Kasko
akasko at openjdk.org
Wed Aug 10 20:51:42 UTC 2022
On Wed, 10 Aug 2022 13:12:57 GMT, Alex Kasko <akasko at openjdk.org> wrote:
>> This change is a follow-up to [this comment](https://bugs.openjdk.org/browse/JDK-8290519?focusedCommentId=14512038&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14512038).
>>
>> Override implementation is based on [this comment](https://bugs.openjdk.org/browse/JDK-8290519?focusedCommentId=14510886&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14510886).
>>
>> As suggested in [this comment](https://github.com/openjdk/jdk/pull/9753#pullrequestreview-1062560789) only English translation is provided for new `resource.wxl-file` label.
>>
>> `getTempdirectory` utility was moved from `BasicTest` to `WindowsHelper` to be able to provide `--temp` and inspect the contents of `config` dir in verifier. It is not clear if `WindowsHelper` is an appropriate place for this utility (`BasicTest` is not Windows-specific), I've assumed that `--temp` flag itself is only used on Windows.
>>
>> Testing:
>>
>> - [x] enhanced `WinL10nTest` adding checks for `-loc` arguments to `light.exe` and additional `@Parameter` run that overrides one of the primary `.wxl` files
>> - [x] ran jtreg:jdk/tools/jpackage/windows and a `BasicTest` in unpack mode
>
> Alex Kasko has updated the pull request incrementally with one additional commit since the last revision:
>
> fixes for bundling with different cultures
About the point "7." above, I've experimented (on Windows Server 2016) with `cmd.exe` and codepages and found that existing behaviour of `jpackage.exe` is consistent with existing behaviour of `java.exe`.
For both `java.exe` and `jpackage.exe`, when "Active codepage" in `cmd.exe` is `437` (default `en-US`):
C:\Users\Administrator>chcp
Active code page: 437
Then if I set default JVM locale to `ja-JP` using `-Duser.language=ja` and `-Duser.country=JP`, then both output in console window and redirected file output will be garbled to question marks `??????`.
If I set the Windows system "Language for non-Unicode programs" to Japanese, then, after the reboot, active codepage in `cmd.exe` will be 932 (note also Japanese file separator):
C:¥projects¥openjdk¥scripts>chcp
Active code page: 932
In this case running both `java.exe` and `jpackage.exe` with `ja-JP` JVM locale will cause Japanese output to be displayed correctly in the `cmd.exe`. And output redirected to file will also be written correctly in `Shift-JIS` encoding.
So I assume that existing behaviour is intended one and not filing the Jira issue now. Please let me know if it is still makes sense to file such Jira issue for `UTF-8` stdout (for example, for the future).
-------------
PR: https://git.openjdk.org/jdk/pull/9780
More information about the core-libs-dev
mailing list