mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
#3705: Command-line arguments were not correctly decoded when the
terminal does not use UTF8. Now the code propagates the unicode string as far as possible, and avoids the conversion to char* which implicitely uses utf-8. Reviewed by Benjamin.
This commit is contained in:
parent
d3013ffa49
commit
9a5499b4e5
4 changed files with 35 additions and 25 deletions
|
@ -135,6 +135,12 @@ class CmdLineTest(unittest.TestCase):
|
|||
self.exit_code('-c', 'pass'),
|
||||
0)
|
||||
|
||||
# Test handling of non-ascii data
|
||||
command = "assert(ord('\xe9') == 0xe9)"
|
||||
self.assertEqual(
|
||||
self.exit_code('-c', command),
|
||||
0)
|
||||
|
||||
|
||||
def test_main():
|
||||
test.support.run_unittest(CmdLineTest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue