Substitute for GNU readline, that can handle UTF-8?

Substitute for GNU readline, that can handle UTF-8?

Post by Fredrik Roube » Sun, 24 Feb 2002 01:23:53



I'm looking for a line editor (something like GNU readline) that I can use
in my application, and that works in different locales (primarily with
ISO-8859-1 and UTF-8, but if that works I assume everything else works as
well). GNU readline currently doesn't work in multibyte locales: erasing
multibyte characters gives the wrong result, and that makes it quite
unusable for my application.

I haven't found anything searching the web, does anyone know where I
should look? I only need very basic editing: erasing characters, moving
the cursor, etc., not all the features provided by GNU readline.

It shouldn't be hard to implement, so someone must have done this already.

Regards // Fredrik Roubert

--


http://www.df.lth.se/~roubert/         SE-222 40 Lund

 
 
 

Substitute for GNU readline, that can handle UTF-8?

Post by those who know me have no need of my nam » Mon, 25 Feb 2002 09:13:08



Quote:>I'm looking for a line editor (something like GNU readline) that I can use
>in my application, and that works in different locales (primarily with
>ISO-8859-1 and UTF-8,
>It shouldn't be hard to implement, so someone must have done this already.

actually it's very hard.

--
okay, have a sig then

 
 
 

Substitute for GNU readline, that can handle UTF-8?

Post by Fredrik Roube » Wed, 27 Feb 2002 08:15:44




> The next readline release will have multibyte character support;
> I integrated the patches from IBM Japan. Of course, that doesn't help
> you now.

Even if it doesn't help me right now, it sounds like great news. Do you
have any idea when this next release will come?

In the meantime I've implemented a very basic (500 lines of C code)
readline replacement that works with multibyte and wide characters.

(So if someone else needs that before the next readline release, just send
me an email.)

Regards // Fredrik Roubert

--


http://www.df.lth.se/~roubert/         SE-222 40 Lund

 
 
 

Substitute for GNU readline, that can handle UTF-8?

Post by Fredrik Roube » Wed, 27 Feb 2002 08:17:02




Quote:>> It shouldn't be hard to implement, so someone must have done this
>> already.

> actually it's very hard.

Actually, it was quite simple.

Regards // Fredrik Roubert

--


http://www.df.lth.se/~roubert/         SE-222 40 Lund

 
 
 

1. GNU readline: make show-all-if-ambiguous the default ???

Hello, I've got a shell-ish program that uses the GNU readline (2.0)
for history and filename completion.  The default behavior for the
completion is to complete a word if it is unique, or beep.  Pressing
the <TAB> key twice in succession will print a list of all
possible commands.

I want to make the double-tab behavior the default for a single tab.
The docs claim tha t if you include 'set show-all-if-ambiguous'
in the ~/.inputrc file, it will do what I want - but is there
a way to make that change part of the program, rather than a user
specific preference?

thanx


--
____________________________________________________________________
   F. Tarek Rogers                          NetEdge Systems
   Phone:     919-991-9202                  P.O. Box 14993

2. OpenOffice build problems

3. GNU readline problem

4. Apache Web Server with Perl Access

5. gnu readline on Solaris 2.2

6. ll

7. GNU readline

8. Vertical array in BASH

9. GNU Readline library linking problems

10. DBX error with GNU readline

11. readline-2.0 from GNU

12. GNU libc extensions (readline) - How to link?

13. GNU Readline install problem