Title: [3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12099) by miss-islington · Pull Request #12108 · python/cpython · GitHub
Open Graph Title: [3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12099) by miss-islington · Pull Request #12108 · python/cpython
X Title: [3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12099) by miss-islington · Pull Request #12108 · python/cpython
Description: 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. (cherry picked from commit ab71f8b) Co-authored-by: Victor Stinner vstinner@redhat.com https://bugs.python.org/issue29571
Open Graph Description: 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.getl...
X Description: 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.getl...
Opengraph URL: https://github.com/python/cpython/pull/12108
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:43ad201a-89dd-15a7-2d82-442b08fd6e4d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D856:1EBB85:21F809C:2F528DB:6A50BAE8 |
| html-safe-nonce | 12a7f91851d3d9c44ef4c96985e5da3b92c08b7f02f23632078ee39827d5e313 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODU2OjFFQkI4NToyMUY4MDlDOjJGNTI4REI6NkE1MEJBRTgiLCJ2aXNpdG9yX2lkIjoiNTA5OTE0ODEwMDg4NDI4MjA4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 661b2711a22777d1948acd6243f38463022bd9e6163c3523c06af75b77ea2b21 |
| hovercard-subject-tag | pull_request:257262103 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/12108/files |
| twitter:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| og:image:alt | 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.getl... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width