Bug #7544

Accented characters in IRB

Added by Cédric FABIANSKI over 1 year ago. Updated over 1 year ago.

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

Description

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

RUBYVERSION
=> "1.9.3"
RUBY
PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBYVERSION
=> "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 "é"

History

#1 Updated by Magnus Holm over 1 year ago

RUBYVERSION
=> "1.9.3"
RUBY
PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBYVERSION
=> "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?

#2 Updated by Yui NARUSE over 1 year 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

RUBYVERSION
=> "1.9.3"
RUBY
PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBYVERSION
=> "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"

#3 Updated by Magnus Holm over 1 year ago

On Tue, Dec 11, 2012 at 4:59 PM, naruse (Yui NARUSE) naruse@airemix.jp 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

RUBYVERSION
=> "1.9.3"
RUBY
PATCHLEVEL
=> 0
puts "Cédric"
Cédric
=> nil

RUBYVERSION
=> "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.

#4 Updated by Yui NARUSE over 1 year 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

#5 Updated by Cédric FABIANSKI over 1 year ago

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

Also available in: Atom PDF