Project

General

Profile

Backport #5941

Backport r34391 (補完候補にマルチバイト文字が含まれる場合の挙動)

Added by no6v (Nobuhiro IMAI) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-dev:45158]

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

Associated revisions

Revision f3dabace
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • ext/readline/readline.c (readline_attempted_completion_function): respect encodings. [Bug #5941]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34391
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • ext/readline/readline.c (readline_attempted_completion_function): respect encodings. [Bug #5941]

Revision 34391
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • ext/readline/readline.c (readline_attempted_completion_function): respect encodings. [Bug #5941]

Revision 34391
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • ext/readline/readline.c (readline_attempted_completion_function): respect encodings. [Bug #5941]

Revision 34391
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • ext/readline/readline.c (readline_attempted_completion_function): respect encodings. [Bug #5941]

Revision 34391
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • ext/readline/readline.c (readline_attempted_completion_function): respect encodings. [Bug #5941]

Revision 34391
Added by nobu (Nobuyoshi Nakada) over 7 years ago

  • ext/readline/readline.c (readline_attempted_completion_function): respect encodings. [Bug #5941]

Revision d66b539d
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) 34391:

    * ext/readline/readline.c (readline_attempted_completion_function):
      respect encodings.  [Bug #5941]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34480
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) 34391:

* ext/readline/readline.c (readline_attempted_completion_function):
  respect encodings.  [Bug #5941]

History

#1

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • 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]
#2

Updated by kouji (Kouji Takao) over 7 years ago

  • 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))

Updated by kouji (Kouji Takao) over 7 years ago

  • Subject changed from 補完候補にマルチバイト文字が含まれる場合の挙動 to Backport 34391 (補完候補にマルチバイト文字が含まれる場合の挙動)

Updated by kouji (Kouji Takao) over 7 years ago

  • Subject changed from Backport 34391 (補完候補にマルチバイト文字が含まれる場合の挙動) to Backport r34391 (補完候補にマルチバイト文字が含まれる場合の挙動)
#5

Updated by naruse (Yui NARUSE) over 7 years ago

  • 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