Project

General

Profile

Bug #3791

Ruby 1.9.2のReadline.readlineとReadline.line_bufferのエンコーディングの非互換

Added by kosaki (Motohiro KOSAKI) over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.3dev

Description

=begin
http://emasaka.blog65.fc2.com/blog-entry-802.html からの転載です

$ cat foo.rb
#!/usr/bin/env ruby
# -- coding: utf-8 --
require 'readline'

s = Readline.readline '> '
p s.encoding
p Readline.line_buffer.encoding
$ ruby foo.rb


#Encoding:UTF-8
#Encoding:ASCII-8BIT

Readline.readlineがロケールに従って文字コードを決定し、
Readline.line_buffer が常にASCII-8BITを返すのは意図的でしょうか?

ASCII-8BITのほうがcompletitonの実装が楽になるケースが今ひとつ
思いつかなかったのでチケット切らさせて頂きました。
=end

Associated revisions

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

  • ext/readline/readline.c (readline_s_get_line_buffer): Readline.line_buffer should return locale string. #3791

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

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

  • ext/readline/readline.c (readline_s_get_line_buffer): Readline.line_buffer should return locale string. #3791

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

  • ext/readline/readline.c (readline_s_get_line_buffer): Readline.line_buffer should return locale string. #3791

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

  • ext/readline/readline.c (readline_s_get_line_buffer): Readline.line_buffer should return locale string. #3791

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

  • ext/readline/readline.c (readline_s_get_line_buffer): Readline.line_buffer should return locale string. #3791

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

  • ext/readline/readline.c (readline_s_get_line_buffer): Readline.line_buffer should return locale string. #3791

Revision 13fdd22f
Added by yugui (Yuki Sonoda) over 7 years ago

merges r29188 from trunk into ruby_1_9_2.

  • ext/readline/readline.c (readline_s_get_line_buffer): Readline.line_buffer should return locale string. #3791

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

History

#1 Updated by naruse (Yui NARUSE) over 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29188.
Motohiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF