JDK-8232936 : Non-ascii are handled incorrectly by generated exe
  • Type: Bug
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: internal
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2019-10-04
  • Updated: 2019-11-14
  • Resolved: 2019-10-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalResolved
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE PROBLEM :
There are 2 phenomenons:
1) Exe can not start under path whose name includes non-ascii
2) File whose name includes both ascii and non-ascii can not be opened by exe.

I have not workaround for the first issue and have to tell user install my application under pure English path.

The second issue arises because I want to have user double click a file to open it by my application when user assoicates the default-open program of this file type to my application. So the command arguments need be accepted by my application.
On my platform, I get following results:
1) When file name and its path include only ascii, no problem.
2) When file name or its path include only non-ascii like pure Chinese, no problem.
3) When file name or its path include both non-ascii and ascii, the argument passed in is messed.
I have neither workaround for the second issue.

Jar has not the 2 problems. It can start from non-ascii path and accept file name in mixed characters.

The following convertion does not help and makes more problems like confusing Jar:
            new String(arg.getBytes(), "utf-8")

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Make an application which accepts argument. 
2) Build its self-contain package with jpakage
3) Copy the package under a path whose name includes non-ascii characters. Then start the EXE, to recreate the first issue.
4) Copy the package under a path whose name includes  only ascii characters. 
5) Associate the default-open program of a file type like ".png" to the EXE.
6) Rename a file of this type in mixed characters that includes both ascii and non-ascii.
7) Double click this file and check whether EXE accepts right file name.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1) EXE can start from a path whose name includes non-ascii character.
2) EXE can accepts arguments which include both ascii and non-ascii.
ACTUAL -
1) EXE can not start from a path whose name includes non-ascii character.
2) Arguments which include both ascii and non-ascii are passed to EXE incorrectly.


Comments
Dup of JDK-8205991
31-10-2019

> Build its self-contain package with jpakage Seems like they created application image > Copy the package under a path whose name includes non-ascii characters. Then start the EXE, to recreate the first issue. Then they copied application image to different location and launched app launcher
24-10-2019