bug-bash
[Top][All Lists]
Advanced

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

Re: Readline macro definition with multibyte characters


From: Chet Ramey
Subject: Re: Readline macro definition with multibyte characters
Date: Sun, 5 Feb 2017 15:28:14 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 2/4/17 9:07 PM, Grisha Levit wrote:
> The character-search command accepts multibyte characters just fine, but
> when reading input from a macro, multibyte characters are not processed
> correctly. For example trying to invoke the macro defined with:
> 
> bind '"\C-f": "\C-]π"'
> 
> will fail to search and will instead type just the second byte of the
> character (x80).
> 
> The following one-line patch fixes the behavior, but I'm not sure if this
> the right place to do it.

Thanks for the report.  It's a good fix.  rl_read_key should return all
valid characters as if they are unsigned chars and reserve values < 0
for EOF and errors.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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