[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
readline 5.0 bug with utf-8 characters + editing ?
From: |
Danny Milosavljevic |
Subject: |
readline 5.0 bug with utf-8 characters + editing ? |
Date: |
Sat, 29 Jan 2005 14:15:18 +0100 (CET) |
Hi,
Thank you for bash and readline :)
I use it every day...
However, I wonder if this is a known problem:
I use readline 5.0, and try the following:
/* gcc -o testreadline testreadline.c -lreadline
-ltermcap */
/* readline 5.0 */
/* set locale to some UTF-8 locale */
/* run, enter "aaaäää" and press "Home" key. -> cursor
pos wrong.
(ä is 2 bytes: octal 303, 244)
then enter any character -> cursor pos more wrong
*/
#include <stdio.h>
#include <readline/readline.h>
int
main(int argc, char *argv[])
{
char const* line;
/* \033[1;31m */
while ((line =
readline("\1\1\033[1;31m\1\2\343\200\216 bla
\343\200\217 bla \343\200\207 ") )) {
if (line && *line)
add_history (line);
}
return 0;
}
(I know, the colors are not reset properly, but this
has been done to make the example as minimal as
possible)
(The actual bug manifests in bash, which you can
imagine is quite annoying.)
(note that tgetent brags something about termcap entry
too long which I dont know how to fix... I do not know
if that has something to do with it)
Note that I also use some patches for readline 5.0,
and these are:
1)
Readline-Release: 5.0
Patch-ID: readline50-001
Bug-Reported-by: "Ralf S. Engelschall"
<rse@engelschall.com>
Bug-Reference-ID:
<20040728082038.GA31398@engelschall.com>
Bug-Reference-URL:
http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00262.html
2)
Readline-Release: 5.0
Patch-ID: readline50-002
Bug-Reported-by: schwab@suse.de
Bug-Reference-ID:
<20040801085535.E83D41DB3FFE9@sykes.suse.de>
Bug-Reference-URL:
http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00004.html
3)
Readline-Release: 5.0
Patch-ID: readline50-003
Bug-Reported-by: alexander@skwar.name
Tomohiro KUBOTA
<debian@tmail.plala.or.jp>
Bug-Reference-ID:
<20040801124721.C69B8A2547A@server.bei.digitalprojects.com>
<16688.41450.433668.480445@gargle.gargle.HOWL>
Bug-Reference-URL:
http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00006.html
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257540
4)
Readline-Release: 5.0
Patch-ID: readline50-004
Bug-Reported-by: Tim Waugh <twaugh@redhat.com>
Bug-Reference-ID: <20040810083805.GT2177@redhat.com>
Bug-Reference-URL:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129526b
http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00116.html
5)
Readline-Release: 5.0
Patch-ID: readline50-005
Bug-Reported-by: Egmont Koblinger <egmont@uhulinux.hu>
Bug-Reference-ID:
<Pine.LNX.4.58L0.0407282151140.8088@sziami.cs.bme.hu>
Bug-Reference-URL:
http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00277.html
Note that I'm not subscribed so please use 'reply to
all'.
Thank you.
cheers,
Danny Milosavljevic
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden:
http://mail.yahoo.de
- readline 5.0 bug with utf-8 characters + editing ?,
Danny Milosavljevic <=