bpo-34523: Fix config_init_fs_encoding() for ASCII by vstinner · Pull Request #10232 · python/cpython

@vstinner

* bpo-34523, bpo-34403: Fix config_init_fs_encoding(): it now uses
  ASCII if _Py_GetForceASCII() is true.
* Fix a regression of commit b2457ef.
* Fix also a memory leak: get_locale_encoding() already allocates
  memory, no need to duplicate the string.