summaryrefslogtreecommitdiffstats
path: root/Python/preconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/preconfig.c')
-rw-r--r--Python/preconfig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/preconfig.c b/Python/preconfig.c
index 011ed53..7ac645d 100644
--- a/Python/preconfig.c
+++ b/Python/preconfig.c
@@ -386,7 +386,9 @@ _PyPreConfig_GetGlobalConfig(_PyPreConfig *config)
#ifdef MS_WINDOWS
COPY_FLAG(legacy_windows_fs_encoding, Py_LegacyWindowsFSEncodingFlag);
#endif
- COPY_FLAG(utf8_mode, Py_UTF8Mode);
+ if (Py_UTF8Mode > 0) {
+ config->utf8_mode = 1;
+ }
#undef COPY_FLAG
#undef COPY_NOT_FLAG