Project

General

Profile

Actions

Bug #3791

closed

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

Added by kosaki (Motohiro KOSAKI) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.3dev
Backport:

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

Actions #1

Updated by naruse (Yui NARUSE) over 14 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

Actions

Also available in: Atom PDF

Like0
Like0