Package: ipython
Version: 0.7.3-2
Severity: normal
Tags: patch

Behaviour in python interpreter:
Python 2.4.4 (#2, Jan 13 2007, 18:15:24)
Type "help", "copyright", "credits" or "license" for more information.
>>> u'Böö'
u'B\xf6\xf6'
>>>

Behaviour in ipython:
Python 2.4.4 (#2, Jan 13 2007, 18:15:24)
IPython 0.7.3 -- An enhanced Interactive Python.

In [1]: u'Böö'
Out[1]: u'B\xc3\xb6\xc3\xb6'

In [2]: print u'Böö'
Böö

Expected behaviour: Same as in regular python interpreter.

Behaviour after the patch:
Python 2.4.4 (#2, Jan 13 2007, 18:15:24)
IPython 0.7.3 -- An enhanced Interactive Python.

In [1]: u'Böö'
Out[1]: u'B\xf6\xf6'

In [2]: print u'Böö'
Böö



-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)

Versions of packages ipython depends on:
ii  python                        2.4.4-2    An interactive high-level object-o
ii  python-central                0.5.12     register and build utility for Pyt

Versions of packages ipython recommends:
ii  python-numeric                24.2-7     Numerical (matrix-oriented) Mathem
pn  python-numeric-ext            <none>     (no description available)
pn  python-pexpect                <none>     (no description available)

-- no debconf information

-- 
Toni Timonen "toni dot timonen at iki dot fi"
NP Solutions Ltd
Helsinki University of Technology
Department of Engineering Physics and Mathematics
diff -rub ipython-0.7.3.orig/IPython/iplib.py ipython-0.7.3/IPython/iplib.py
--- ipython-0.7.3.orig/IPython/iplib.py	2006-12-11 18:52:16.000000000 +0200
+++ ipython-0.7.3/IPython/iplib.py	2007-02-04 23:37:03.000000000 +0200
@@ -1965,7 +1965,7 @@
         """
 
         try:
-            line = raw_input_original(prompt)
+            line = raw_input_original(prompt).decode(sys.stdin.encoding)
         except ValueError:
             warn("\n********\nYou or a %run:ed script called sys.stdin.close() or sys.stdout.close()!\nExiting IPython!")
             self.exit_now = True

Attachment: signature.asc
Description: Digital signature

Reply via email to