[Ipython-tickets] [IPython] #156: ipython crashes when input specific characters

IPython ipython-tickets@scipy....
Tue May 15 01:43:54 CDT 2007


#156: ipython crashes when input specific characters
---------------------+------------------------------------------------------
 Reporter:  hongqn   |       Owner:  fperez
     Type:  defect   |      Status:  new   
 Priority:  normal   |   Milestone:        
Component:  ipython  |     Version:        
 Severity:  major    |    Keywords:        
---------------------+------------------------------------------------------
 When input the Chinese character '阿' (UTF-8: '\xe9\x98\xbf', a quite
 frequently used character in Chinese language) in ipython, it crashed.
 Other characters have no such effect.

 {{{
 Python 2.5 (r25:51908, Apr 14 2007, 16:13:48)
 Type "copyright", "credits" or "license" for more information.

 IPython 0.8.1 -- An enhanced Interactive Python.
 ?       -> Introduction to IPython's features.
 %magic  -> Information about IPython's 'magic' % functions.
 help    -> Python's own help system.
 object? -> Details about 'object'. ?object also works, ?? prints more.

 In [1]: import sys

 In [2]: sys.stdin.encoding
 Out[2]: 'UTF-8'

 In [3]: '你好'
 Out[3]: '\xe4\xbd\xa0\xe5\xa5\xbd'

 In [4]: '    ��'
 WARNING:
 ********
 You or a %run:ed script called sys.stdin.close() or sys.stdout.close()!
 Exiting IPython!
 }}}

 However the same input is ok in a normal python shell:
 {{{
 Python 2.5 (r25:51908, Apr 14 2007, 16:13:48)
 [GCC 4.1.2 (Gentoo 4.1.2)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import sys
 >>> sys.stdin.encoding
 'UTF-8'
 >>> '你好'
 '\xe4\xbd\xa0\xe5\xa5\xbd'
 >>> '阿'
 '\xe9\x98\xbf'
 }}}

 Produced on a amd64 gentoo linux laptop running Xfce 4.4.1.  locale is set
 to en_US.UTF-8.  using SCIM to input Chinese characters.

-- 
Ticket URL: <http://projects.scipy.org/ipython/ipython/ticket/156>
IPython <http://ipython.scipy.org>
The IPython interactive Python system


More information about the Ipython-tickets mailing list