Project

General

Profile

Actions

Bug #550

closed

irbで日本語を入力できない

Added by yugui (Yuki Sonoda) about 16 years ago. Updated over 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-dev:36198]

Description

=begin
Mac OS X上のirbで日本語文字を入力しようとすると、無効なバイト列に化けて例外が発生します。

% uname -a
Darwin yugui-macbook.local 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun 9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386
% ruby-trunk -v
ruby 1.9.0 (2008-09-05 revision 0) [i386-darwin9.4.0]
% echo $LANG
ja_JP.UTF-8
% irb-trunk
irb(main):001:0> "あ"
SyntaxError: (irb):1: invalid multibyte char
(irb):1: unterminated string meets end of file
from /Users/yugui/local/bin/irb-trunk:12:in `'
irb(main):002:0> ENCODING
=> #Encoding:US-ASCII

どうも、readlineの中で入力文字列が無効なバイト列になっているようです。
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0