Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.


Browse files Browse the repository at this point in the history
8242283: Can't start JVM when java home path includes non-ASCII chara…

Reviewed-by: yan
Backport-of: d34f732
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Feb 12, 2021
1 parent 8519133 commit c229f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/os/windows/os_windows.cpp
Expand Up @@ -4282,7 +4282,7 @@ static void file_attribute_data_to_stat(struct stat* sbuf, WIN32_FILE_ATTRIBUTE_

static errno_t convert_to_unicode(char const* char_path, LPWSTR* unicode_path) {
// Get required buffer size to convert to Unicode
int unicode_path_len = MultiByteToWideChar(CP_THREAD_ACP,
int unicode_path_len = MultiByteToWideChar(CP_ACP,
char_path, -1,
NULL, 0);
Expand All @@ -4292,7 +4292,7 @@ static errno_t convert_to_unicode(char const* char_path, LPWSTR* unicode_path) {

*unicode_path = NEW_C_HEAP_ARRAY(WCHAR, unicode_path_len, mtInternal);

int result = MultiByteToWideChar(CP_THREAD_ACP,
int result = MultiByteToWideChar(CP_ACP,
char_path, -1,
*unicode_path, unicode_path_len);
Expand Down

1 comment on commit c229f3c

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.