Project

General

Profile

Actions

Bug #6262

closed

[readline] reverse-i-search with multibyte chars

Added by no6v (Nobuhiro IMAI) about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-04-05 trunk 35241) [x86_64-linux]
Backport:
[ruby-dev:45493]

Description

=begin
以下のように、C-r にマルチバイト文字を渡すとバイトの切れ端が返ってきます。
IM を介すので、うまく動いてもインクリメンタルサーチにはならないのですが、
履歴が検索できるようになるとありがたいです。

encoding: UTF-8

require "readline"

RUBY_DESCRIPTION # => "ruby 2.0.0dev (2012-04-05 trunk 35241) [x86_64-linux]"
Readline::VERSION # => "6.2"
IO.pipe do |r, w|
Readline.input = r
(w << "\crあ").reopen(IO::NULL)
Readline.readline # => "\x81\x82"
end

ちなみに、Emacs のバッファ上で xmpfilter を実行すると、

>> (reverse-i-search)`': \201^H\201\202

という raw-text になって、\343 はどっかに行ってしまって、
よく分からないことになっています。参考まで。
=end


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #6601: [readline] Alt-* commands do not work in reverse-i-searchClosedkouji (Kouji Takao)06/17/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0