mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 07:19:08 +08:00
26 lines
697 B
Diff
26 lines
697 B
Diff
diff --git a/libcharset/lib/localcharset.c b/libcharset/lib/localcharset.c
|
|
index 3aceb42..dadd95a 100644
|
|
--- a/libcharset/lib/localcharset.c
|
|
+++ b/libcharset/lib/localcharset.c
|
|
@@ -455,7 +455,10 @@ locale_charset (void)
|
|
# endif
|
|
|
|
#elif defined WIN32_NATIVE
|
|
-
|
|
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
|
|
+ // GetACP() not available to UWP apps
|
|
+ codeset = NULL;
|
|
+#else
|
|
static char buf[2 + 10 + 1];
|
|
|
|
/* Woe32 has a function returning the locale's codepage as a number:
|
|
@@ -467,7 +470,7 @@ locale_charset (void)
|
|
encoding is the best bet. */
|
|
sprintf (buf, "CP%u", GetACP ());
|
|
codeset = buf;
|
|
-
|
|
+#endif
|
|
#elif defined OS2
|
|
|
|
const char *locale;
|