diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-08-28 14:53:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 14:53:31 +0200 |
commit | 4ff38870b1de8a3add5357edf125c2866bc42b54 (patch) | |
tree | 40dfeda13262fc21fb5ef97029564a5c084b8553 /Python/fileutils.c | |
parent | 204fb459ca1d77c2eab02a3191ba2d2216ff2d72 (diff) | |
download | cpython-git-4ff38870b1de8a3add5357edf125c2866bc42b54.tar.gz |
bpo-34527: Fix FreeBSD with POSIX locale (GH-8975)
On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also forces
the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if
the LC_CTYPE locale is "C".
Diffstat (limited to 'Python/fileutils.c')
-rw-r--r-- | Python/fileutils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index b9638d2df5..b8e489125e 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -132,7 +132,7 @@ check_force_ascii(void) loc = setlocale(LC_CTYPE, NULL); if (loc == NULL) goto error; - if (strcmp(loc, "C") != 0) { + if (strcmp(loc, "C") != 0 && strcmp(loc, "POSIX") != 0) { /* the LC_CTYPE locale is different than C */ return 0; } |