Projects

Ticket #352 (closed defect: fixed)

Opened 2 years ago

Last modified 15 months ago

macirb does not eval UTF-String

Reported by: dev@… Owned by: lsansonetti@…
Priority: major Milestone: MacRuby 0.7
Component: MacRuby Keywords:
Cc:

Description (last modified by mattaimonetti@…) (diff)

$ echo 'p "Rübe"' | macirb
p "Rübe"
SyntaxError: (irb):1: unterminated string meets end of file
	from core:in `eval:'
	from core:in `evaluate:'

Change History

  Changed 2 years ago by mattaimonetti@…

  • description modified (diff)

confirmed

follow-up: ↓ 3   Changed 2 years ago by lsansonetti@…

irb cannot handle multibyte strings because of a limitation of our readline implementation (libedit), but here it seems to be a different problem (the string is given as an argument and not from stdin).

in reply to: ↑ 2   Changed 2 years ago by dev@…

Replying to lsansonetti@…:

irb cannot handle multibyte strings because of a limitation of our readline implementation (libedit), but here it seems to be a different problem (the string is given as an argument and not from stdin).

but typing it in macirb directly gives the same result:

$ macirb
irb(main):001:0> p "Rübe"
SyntaxError: (irb):1: unterminated string meets end of file
	from core:in `eval:'
	from core:in `evaluate:

  Changed 21 months ago by wanthalf@…

I cannot even enter some letters - I get only questionmarks. Why do you not just compile MacRuby with the real "readline" instead of "libedit", which is buggy and missing a lot of features?

  Changed 21 months ago by lsansonetti@…

  • milestone MacRuby 0.5 deleted

We do use libedit because it's what's available on Mac OS X by default. Readline isn't bundled because of licensing issues. We are aware that libedit misses functionality (the biggest problem is certainly missing support for multibyte characters). But this isn't a MacRuby problem, you should report this to Apple using  http://bugreporter.apple.com. Alternatively, in trunk (future 0.7) there is a new irb implementation (called DietRB) and it is possible to plug some pure-ruby readline code on top of it, fixing the multibyte input problems.

  Changed 16 months ago by jhemmelg@…

Just checked, and this does work with the 0.7 release. This ticket can be closed. % echo 'p "Rübe"' | macirb "Rübe" => "Rübe"

  Changed 15 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

Thanks.

Note: See TracTickets for help on using tickets.