Forum: Ruby-core [ruby-trunk - Bug #7544][Open] Accented characters in IRB

Posted by "cfabianski (Cédric FABIANSKI)" <cfabianski@me.com (Guest)
on 2012-12-11 16:31
(Received via mailing list)
Issue #7544 has been reported by cfabianski (Cédric FABIANSKI).

----------------------------------------
Bug #7544: Accented characters in IRB
https://bugs.ruby-lang.org/issues/7544

Author: cfabianski (Cédric FABIANSKI)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p327 (2012-11-10 revision 37606) 
[x86_64-darwin11.4.2]


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 "é"
Posted by Magnus Holm (judofyr)
on 2012-12-11 16:39
(Received via mailing list)
>>> 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?
Posted by naruse (Yui NARUSE) (Guest)
on 2012-12-11 16:59
(Received via mailing list)
Issue #7544 has been updated by naruse (Yui NARUSE).

Status changed from Open to Rejected

cfabianski (Cédric FABIANSKI) wrote:
> >> 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"
----------------------------------------
Bug #7544: Accented characters in IRB
https://bugs.ruby-lang.org/issues/7544#change-34619

Author: cfabianski (Cédric FABIANSKI)
Status: Rejected
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p327 (2012-11-10 revision 37606) 
[x86_64-darwin11.4.2]


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 "é"
Posted by Magnus Holm (judofyr)
on 2012-12-11 19:13
(Received via mailing list)
On Tue, Dec 11, 2012 at 4:59 PM, naruse (Yui NARUSE) <naruse@airemix.jp> 
wrote:
>> >> RUBY_PATCHLEVEL
>> 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.
Posted by naruse (Yui NARUSE) (Guest)
on 2012-12-12 06:37
(Received via mailing list)
Issue #7544 has been updated by naruse (Yui NARUSE).

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-doe...
----------------------------------------
Bug #7544: Accented characters in IRB
https://bugs.ruby-lang.org/issues/7544#change-34648

Author: cfabianski (Cédric FABIANSKI)
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]


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 "é"
Posted by "cfabianski (Cédric FABIANSKI)" <cfabianski@me.com (Guest)
on 2012-12-19 14:16
(Received via mailing list)
Issue #7544 has been updated by cfabianski (Cédric FABIANSKI).


Hum I didn't get notified by your updates >_<
Thanks a lot for your feedbacks
----------------------------------------
Bug #7544: Accented characters in IRB
https://bugs.ruby-lang.org/issues/7544#change-34864

Author: cfabianski (Cédric FABIANSKI)
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]


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 "é"
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.