Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4b2c468e
Commit
4b2c468e
authored
May 17, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
decoding unicode literals.
parent
c8059e48
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
Lib/idlelib/PyShell.py
Lib/idlelib/PyShell.py
+5
-3
Lib/idlelib/run.py
Lib/idlelib/run.py
+2
-0
Misc/NEWS
Misc/NEWS
+6
-0
No files found.
Lib/idlelib/PyShell.py
View file @
4b2c468e
...
...
@@ -34,6 +34,7 @@ from idlelib import rpc
from
idlelib
import
Debugger
from
idlelib
import
RemoteDebugger
from
idlelib
import
macosxSupport
from
idlelib
import
IOBinding
IDENTCHARS
=
string
.
ascii_letters
+
string
.
digits
+
"_"
HOST
=
'127.0.0.1'
# python execution server on localhost loopback
...
...
@@ -668,10 +669,11 @@ class ModifiedInterpreter(InteractiveInterpreter):
self
.
more
=
0
self
.
save_warnings_filters
=
warnings
.
filters
[:]
warnings
.
filterwarnings
(
action
=
"error"
,
category
=
SyntaxWarning
)
if
isinstance
(
source
,
unicode
):
from
idlelib
import
IOBinding
if
isinstance
(
source
,
unicode
)
and
IOBinding
.
encoding
!=
'utf-8'
:
try
:
source
=
source
.
encode
(
IOBinding
.
encoding
)
source
=
'# -*- coding: %s -*-
\
n
%s'
%
(
IOBinding
.
encoding
,
source
.
encode
(
IOBinding
.
encoding
))
except
UnicodeError
:
self
.
tkconsole
.
resetoutput
()
self
.
write
(
"Unsupported characters in input
\
n
"
)
...
...
Lib/idlelib/run.py
View file @
4b2c468e
...
...
@@ -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
),
{})
...
...
Misc/NEWS
View file @
4b2c468e
...
...
@@ -25,6 +25,12 @@ Library
- Issue #24134: Reverted issue #24134 changes.
IDLE
----
- Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
decoding unicode literals.
What'
s
New
in
Python
2.7.10
release
candidate
1
?
================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment