Re: konsole/gnome-terminal/xterm, UTF-8 and backspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Doncho N. Gunchev wrote:
    Hello,
    when a shell/python script reads input from the user in konsole and
gnome-terminal it I enter non-ascii characters (ex: "ÐÑÐÐÐ", "Test" in
English) backspace does not work correct. For example:
--- cut ---
$ echo -n "Test: "; read a; echo "[$a]"
Test: ÐÑÐÐÐ
[ You can paste this, then hit backspace 4 times to get the next line ]
Test: Ð
[ Press Enter here and you get ]
[ÐÑÐ]
$ _
--- cut ---
    If I erase one character I get '[ÐÑÐÐï'
    Text editing in bash and mc works, but in python 'starts to erase'
the '>>> ' prompt. In xterm instead of cyrilic letters I get spaces.
I wanted to enter a bug, but I don't know against what to. Looks like
backspace erases single bytes, while these letters consist of 2. Can
someone direct me and confirm it?


Both python and bash use readline to do line editing. 4.3-13 is the latest in rawhide but version 5.0 is available which seems to fix the issues you mention. Search for multibyte in: http://cnswww.cns.cwru.edu/php/chet/readline/CHANGES

--
PÃdraig Brady - http://www.pixelbeat.org
--


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux