bpo-33601 Py_UTF8Mode is not documented by Vidhyavinu · Pull Request #31480 · python/cpython (original) (raw)
I'm not sure that it works this way. preconfig_get_global_vars() ignores Py_UTF8Mode if Py_UTF8Mode <= 0
.
Py_UTF8Mode should not be used: PyPreConfig.utf8_mode should be used instead. Today, it seems like the only purpose of Py_UTF8Mode is to explicitly enable the Python UTF-8 Mode with Py_UTF8Mode=1.