[IPython-user] Chinese char width problem in pyreadline

pan nirvana117@gmail....
Sun Oct 21 13:47:00 CDT 2007

I have used the latest pyreadline-1.5.svn.tar.gz in Chinese Windows XP.

The problem is that when I type some Chinese char, but can only delete half
of a char per time, so I have to delete twice to del the char. The same
problem with moving left or right.

It seems Chinese char have 2 width of a ascii. The default encoding  of
console in Chinese XP is CP936(two bytes encodes one Chinese char).

I have looked the code in pyreadline, it uses the default encoding

I have a question is that can pyreadline use unicode internally instead? I
thought It may be the easy way to fix the problem(no more half of char, and
maybe only need to modify some code in pyreadline\console\console.py file).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ipython.scipy.org/pipermail/ipython-user/attachments/20071022/3b181032/attachment.html 

More information about the IPython-user mailing list