mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 14:08:35 +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, '.');
|
p = strrchr(locale, '.');
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return (GetACP());
|
return (GetACP());
|
||||||
|
if (strcmp(p+1, "utf8") == 0)
|
||||||
|
return CP_UTF8;
|
||||||
cp = my_atoi(p+1);
|
cp = my_atoi(p+1);
|
||||||
if (cp <= 0)
|
if ((int)cp <= 0)
|
||||||
return (GetACP());
|
return (GetACP());
|
||||||
return (cp);
|
return (cp);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user