mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 12:16:40 +08:00
libarchive: Add support for UTF-8 locale on Windows
Backport libarchive upstream commit `c46e7993` (windows: Support UTF-8 locale, 2018-07-23, v3.4.0~105^2). Fixes: #20320
This commit is contained in:
@@ -1513,8 +1513,10 @@ get_current_codepage(void)
|
||||
p = strrchr(locale, '.');
|
||||
if (p == NULL)
|
||||
return (GetACP());
|
||||
if (strcmp(p+1, "utf8") == 0)
|
||||
return CP_UTF8;
|
||||
cp = my_atoi(p+1);
|
||||
if (cp <= 0)
|
||||
if ((int)cp <= 0)
|
||||
return (GetACP());
|
||||
return (cp);
|
||||
}
|
||||
|
Reference in New Issue
Block a user