[IPython-user] Chinese char width problem in pyreadline
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...
More information about the IPython-user