unicode bug - encoding input
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IPython |
Invalid
|
High
|
Fernando Perez | ||
0.11 |
Fix Released
|
Undecided
|
Unassigned | ||
ipython (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Default Python shell:
>>> u'абвгд'
u'\u0430\
IPython 0.9.1:
>>> u'абвгд'
u'\xd0\
>>> 'абвгд'
u'\u0430\
sys.stdin.encoding is 'UTF-8'.
How to fix: remove the line №2022 from IPython/iplib.py (for 0.9.1 release). Here it is:
--- a/iplib.py
+++ b/iplib.py
@@ -2019,7 +2019,6 @@
# this allows execution of indented pasted code. It is tempting
# to add '\n' at the end of source to run commands like ' a=1'
# directly, but this fails for more complicated scenarios
- source=
if source[:1] in [' ', '\t']:
source = 'if 1:\n%s' % source
I didn't find any intoduced bugs by a quick check.
Additionaly, I checked ipython-wx and ipythonx - latter doesn't have this bug.
description: | updated |
Changed in ipython: | |
assignee: | nobody → fdo.perez |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in ipython: | |
importance: | Medium → High |
milestone: | none → 0.11 |
Changed in ipython (Ubuntu): | |
status: | New → Confirmed |
tags: | added: patch |
Changed in ipython (Ubuntu): | |
status: | Confirmed → Fix Released |
This line in trunk: http:// bazaar. launchpad. net/~ipython- dev/ipython/ trunk/annotate/ head%3A/ IPython/ /iplib. py#L2031