mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8242283: Can't start JVM when java home path includes non-ASCII character
Reviewed-by: naoto, hseigel
This commit is contained in:
parent
4a09f31eff
commit
d34f732b99
5 changed files with 11 additions and 11 deletions
|
@ -334,7 +334,7 @@ JDK_Canonicalize(const char *orig, char *out, int len) {
|
|||
int ret = -1;
|
||||
|
||||
/* Get required buffer size to convert to Unicode */
|
||||
wpath_len = MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS,
|
||||
wpath_len = MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
|
||||
orig, -1, NULL, 0);
|
||||
if (wpath_len == 0) {
|
||||
goto finish;
|
||||
|
@ -344,7 +344,7 @@ JDK_Canonicalize(const char *orig, char *out, int len) {
|
|||
goto finish;
|
||||
}
|
||||
|
||||
if (MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS,
|
||||
if (MultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS,
|
||||
orig, -1, wpath, wpath_len) == 0) {
|
||||
goto finish;
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ JDK_Canonicalize(const char *orig, char *out, int len) {
|
|||
goto finish;
|
||||
}
|
||||
|
||||
if (WideCharToMultiByte(CP_THREAD_ACP, 0,
|
||||
if (WideCharToMultiByte(CP_ACP, 0,
|
||||
wresult, -1, out, len, NULL, NULL) == 0) {
|
||||
goto finish;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue