bug-bash
[Top][All Lists]
Advanced

[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"
<address@hidden>
Bug-Reference-ID:
<address@hidden>
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: address@hidden
Bug-Reference-ID:
<address@hidden>
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: address@hidden
                 Tomohiro KUBOTA
<address@hidden>
Bug-Reference-ID:
<address@hidden>
                 
<address@hidden>
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 <address@hidden>
Bug-Reference-ID: <address@hidden>
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 <address@hidden>
Bug-Reference-ID:
<address@hidden>
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]