diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-12-04 00:34:47 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-12-04 00:34:47 (GMT) |
commit | d45c7f8d74d30de0a558b10e04541b861428b7c1 (patch) | |
tree | cb7c98ee584572691df70387baf586853f4298cf /Lib | |
parent | ca9f8b21c8f047501fbf19668339d1c67523de79 (diff) | |
download | cpython-d45c7f8d74d30de0a558b10e04541b861428b7c1.zip cpython-d45c7f8d74d30de0a558b10e04541b861428b7c1.tar.gz cpython-d45c7f8d74d30de0a558b10e04541b861428b7c1.tar.bz2 |
Issue #16455: On FreeBSD and Solaris, if the locale is C, the
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_cmd_line_script.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index f066204..6051e18 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -367,11 +367,10 @@ class CmdLineTest(unittest.TestCase): # Mac OS X denies the creation of a file with an invalid UTF-8 name. # Windows allows to create a name with an arbitrary bytes name, but # Python cannot a undecodable bytes argument to a subprocess. - #if (support.TESTFN_UNDECODABLE - #and sys.platform not in ('win32', 'darwin')): - # name = os.fsdecode(support.TESTFN_UNDECODABLE) - #elif support.TESTFN_NONASCII: - if support.TESTFN_NONASCII: + if (support.TESTFN_UNDECODABLE + and sys.platform not in ('win32', 'darwin')): + name = os.fsdecode(support.TESTFN_UNDECODABLE) + elif support.TESTFN_NONASCII: name = support.TESTFN_NONASCII else: self.skipTest("need support.TESTFN_NONASCII") |