Issue #9204 has been updated by Baptiste Daroussin.


Please not that on FreeBSD I managed to fix the issue

Basically I added to the latest libedit a couple of patches:
https://svnweb.freebsd.org/ports/head/devel/libedit/files/patch-src_el.c?view=markup
https://svnweb.freebsd.org/ports/head/devel/libedit/files/patch-src_eln.c?revision=376581&view=markup

I have also had to remove the following line from the ext/readline/extconf.rb in ruby:
readline.have_func("rl_getc_function")

The env should be set to support UTF-8

----------------------------------------
Bug #9204: Issues when compiled with libedit instead of readline
https://bugs.ruby-lang.org/issues/9204#change-51063

* Author: Stefan Daschek
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.1.0dev (2013-11-23 trunk 43807) [x86_64-darwin13.0
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN
----------------------------------------
Compiling Ruby on Mac OS X uses BSD libedit instead of GNU readline, leading to various problems. Most notably: With libedit it”Ēs not possibleto input accented characters (e.g. ) in irb or pry:
  
 $ irb # Ruby 2.1.0-preview2
 irb(main):001:0> "a \U+FFC3\U+FFA4" # typing 'a ' results in this weird escape sequence
 => "a "

This issue has already been mentioned on ruby-core in 2009, but with no apparent result: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/21259

This shows up quite often, usually it”Ēs suggested to manually install GNU readline before compiling Ruby (and making sure readline is actuallyfound and used when configuring / compiling):

https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X
https://github.com/wayneeseguin/rvm/issues/1016
http://jorgebernal.info/2009/11/18/fixing-snow-leopard-ruby-readline/

Maybe Ruby could bundle readline to avoid this kind of issues? 



-- 
https://bugs.ruby-lang.org/