Backport #5941 closed
Backport r34391 (補完候補にマルチバイト文字が含まれる場合の挙動)
Added by no6v (Nobuhiro IMAI) almost 13 years ago.
Updated almost 13 years ago.
Description
=begin
以下のように、補完候補にマルチバイト文字が含まれる場合に、
文字単位ではなくバイト単位で処理されてしまうのは仕様でしょうか?
出来れば文字単位で処理されて、「あ」だけがバッファに残ったまま、
補完候補が表示されて欲しいです(以下では補完候補は表示しないようにしています)。
メンテナの高尾さんからはバグではないかと教えていただいたので、
Bug ということでチケットを作成しています。
encoding: UTF-8¶
require "readline"
RUBY_DESCRIPTION # => "ruby 2.0.0dev (2012-01-27 trunk 34383) [x86_64-linux]"
Readline::VERSION # => "6.2"
Readline.completion_proc = ->(text){%w[ああ あい]}
IO.pipe{|r, w|
Readline.input = r
Readline.output = (w << "あ\t").reopen(IO::NULL)
p Readline.readline
}
>> "あ\xE3\x81"¶
=end
Status changed from Open to Closed
% Done changed from 0 to 100
This issue was solved with changeset r34391.
Nobuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
ext/readline/readline.c (readline_attempted_completion_function):
respect encodings. [Bug #5941 ]
Tracker changed from Bug to Backport
Project changed from Ruby master to Backport193
Category deleted (ext )
Status changed from Closed to Open
Assignee deleted (kouji (Kouji Takao) )
Subject changed from 補完候補にマルチバイト文字が含まれる場合の挙動 to Backport 34391 (補完候補にマルチバイト文字が含まれる場合の挙動)
Subject changed from Backport 34391 (補完候補にマルチバイト文字が含まれる場合の挙動) to Backport r34391 (補完候補にマルチバイト文字が含まれる場合の挙動)
Status changed from Open to Closed
This issue was solved with changeset r34480.
Nobuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 34391:
* ext/readline/readline.c (readline_attempted_completion_function):
respect encodings. [Bug #5941]
Also available in: Atom
PDF
Like 0
Like 0 Like 0 Like 0 Like 0 Like 0