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

P at draigBrady.com P at draigBrady.com
Wed Dec 8 14:19:42 UTC 2004


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
--




More information about the fedora-devel-list mailing list