Project

General

Profile

Actions

Bug #7544

closed

Accented characters in IRB

Added by cfabianski (Cédric FABIANSKI) over 11 years ago. Updated over 11 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2]
Backport:
[ruby-core:50765]

Description

Starting from Ruby 1.9.3 Patchlevel 0 the accented characters are not well handled into IRB

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 327
=> puts "C\U+FFC3\U+FFA9dric"
Cdric
=> nil

Note : "\U+FFC3\U+FFA9" is what I'm getting when I try to enter "é"

Updated by judofyr (Magnus Holm) over 11 years ago

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 327
=> puts "C\U+FFC3\U+FFA9dric"
Cdric
=> nil

Note : "\U+FFC3\U+FFA9" is what I'm getting when I try to enter "é"

This is also a problem in Pry, so maybe something changed in Readline?

Updated by naruse (Yui NARUSE) over 11 years ago

  • Status changed from Open to Rejected

cfabianski (Cédric FABIANSKI) wrote:

Starting from Ruby 1.9.3 Patchlevel 0 the accented characters are not well handled into IRB

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 327
=> puts "C\U+FFC3\U+FFA9dric"
Cdric
=> nil

Note : "\U+FFC3\U+FFA9" is what I'm getting when I try to enter "é"

It should be
puts "C\u00e9dric"

Updated by judofyr (Magnus Holm) over 11 years ago

On Tue, Dec 11, 2012 at 4:59 PM, naruse (Yui NARUSE) wrote:

Issue #7544 has been updated by naruse (Yui NARUSE).

Status changed from Open to Rejected

cfabianski (Cédric FABIANSKI) wrote:

Starting from Ruby 1.9.3 Patchlevel 0 the accented characters are not well handled into IRB

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 327
=> puts "C\U+FFC3\U+FFA9dric"
Cdric
=> nil

Note : "\U+FFC3\U+FFA9" is what I'm getting when I try to enter "é"

It should be
puts "C\u00e9dric"

I tihnk you're misundestanding this issue.

If I type "æ" in an IRB session this is inserted instead:
"\U+FFC3\U+FFA6". It just magically appears. But it doesn't seem to be
actual characters that IRB sees. I only need to press backspace
twice to get rid of everything. And if I press Enter, it just gets
ignored by IRB.

Updated by naruse (Yui NARUSE) over 11 years ago

  • Status changed from Rejected to Third Party's Issue

Ah, I see what you are saying.
It is because you are using irb with editline, not readline.

irb(main):001:0> Readline::VERSION
=> "EditLine wrapper"

You must specify --with-readline-dir on configure.
see also http://stackoverflow.com/questions/5671074/rvm-does-not-install-ruby-1-9-2-on-snow-leopard-error-running-make

Updated by cfabianski (Cédric FABIANSKI) over 11 years ago

Hum I didn't get notified by your updates >_<
Thanks a lot for your feedbacks

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0