bpo-34403: On HP-UX, force ASCII for C locale (GH-8969)
On HP-UX with C or POSIX locale, sys.getfilesystemencoding() now returns
"ascii" instead of "roman8" (when the UTF-8 Mode is disabled and the C locale
is not coerced).
nl_langinfo(CODESET) announces "roman8" whereas it uses the Latin1
encoding in practice.
diff --git a/Include/fileutils.h b/Include/fileutils.h
index e4bf6d4..3708784 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -170,6 +170,11 @@
#endif /* Py_LIMITED_API */
+
+#ifdef Py_BUILD_CORE
+PyAPI_FUNC(int) _Py_GetForceASCII(void);
+#endif
+
#ifdef __cplusplus
}
#endif