Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk13u-dev Public archive

Commit c229f3c

Browse files
Olga MikhaltsovaYuri Nesterenko
Olga Mikhaltsova
authored and
Yuri Nesterenko
committed
8242283: Can't start JVM when java home path includes non-ASCII character
Reviewed-by: yan Backport-of: d34f732
1 parent 8519133 commit c229f3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hotspot/os/windows/os_windows.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -4282,7 +4282,7 @@ static void file_attribute_data_to_stat(struct stat* sbuf, WIN32_FILE_ATTRIBUTE_
42824282

42834283
static errno_t convert_to_unicode(char const* char_path, LPWSTR* unicode_path) {
42844284
// Get required buffer size to convert to Unicode
4285-
int unicode_path_len = MultiByteToWideChar(CP_THREAD_ACP,
4285+
int unicode_path_len = MultiByteToWideChar(CP_ACP,
42864286
MB_ERR_INVALID_CHARS,
42874287
char_path, -1,
42884288
NULL, 0);
@@ -4292,7 +4292,7 @@ static errno_t convert_to_unicode(char const* char_path, LPWSTR* unicode_path) {
42924292

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

4295-
int result = MultiByteToWideChar(CP_THREAD_ACP,
4295+
int result = MultiByteToWideChar(CP_ACP,
42964296
MB_ERR_INVALID_CHARS,
42974297
char_path, -1,
42984298
*unicode_path, unicode_path_len);

0 commit comments

Comments
 (0)