Skip to content

Reline does not support convert-meta #710

@tompng

Description

@tompng

When encoding is set to 7bit-encoding or convert-meta is turned on in inputrc, Readline converts byte(>= 128) to ESC + (byte & 0x7f).
Looking into the source code, it looks like Reline is trying to support it, but actually it does not.

We can either support it (if an environment using 8th bit as meta still exist), or clean up unused code.

How to reproduce

Bytes of Japanese letter is [227, 129, 130] which will be converted to ESC c ESC \C-a ESC \C-b.
To reproduce, type directly from IME or paste without using bracketed paste.

# ~/.inputrc
set enable-bracketed-paste off

Readline

LANG="" irb --readline
irb(main):001> Readline::VERSION
=> "8.2" # Make sure readline-ext is installed
# input "foobar\C-aあ"
irb(main):002> Foobar

Reline

LANG="" irb
irb(main):001> Encoding.default_external
=> #<Encoding:US-ASCII>
# input "foobar\C-aあ"
irb(main):002> foobar
# does not respond to keystrokes(except arrow keys)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions