summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/run.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-17 10:53:54 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-17 10:53:54 (GMT)
commit4b2c468e7464dc29700b50afcfc0bf101bea7fb8 (patch)
treec9e93aee511c3acccaf8b91ab19d13bd19fab579 /Lib/idlelib/run.py
parentc8059e48f2963acfcc3682bc9ee91b80ee3e501b (diff)
downloadcpython-4b2c468e7464dc29700b50afcfc0bf101bea7fb8.zip
cpython-4b2c468e7464dc29700b50afcfc0bf101bea7fb8.tar.gz
cpython-4b2c468e7464dc29700b50afcfc0bf101bea7fb8.tar.bz2
Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
decoding unicode literals.
Diffstat (limited to 'Lib/idlelib/run.py')
-rw-r--r--Lib/idlelib/run.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 6ffc1b9..d023e28 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -210,6 +210,8 @@ def cleanup_traceback(tb, exclude):
fn, ln, nm, line = tb[i]
if nm == '?':
nm = "-toplevel-"
+ if fn.startswith("<pyshell#") and IOBinding.encoding != 'utf-8':
+ ln -= 1 # correction for coding cookie
if not line and fn.startswith("<pyshell#"):
line = rpchandler.remotecall('linecache', 'getline',
(fn, ln), {})