bpo-29571: Fix test_re.test_locale_flag() (GH-12099)
Use locale.getpreferredencoding() rather than locale.getlocale() to get the locale encoding. With some locales, locale.getlocale() returns the wrong encoding. For example, on Fedora 29, locale.getlocale() returns ISO-8859-1 encoding for the "en_IN" locale, whereas locale.getpreferredencoding() reports the correct encoding: UTF-8.
V
Victor Stinner committed
ab71f8b793f7b42853ccd2a127ae7720adc5bcb4
Parent: ef17fdb
Committed by GitHub <noreply@github.com>
on 2/28/2019, 11:08:03 PM