JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-3338

jIRB cannot get any input with Polish characters (utf-8) on Mac OSX

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OS X Leopard 10.5.6. iTerm terminal, LANG pl_PL with utf-8
    • Number of attachments :
      0

      Description

      I'm opening jirb.

      When I try to type or paste following string:

      "wkleić zażłć gęślą jaźń"

      It will show me:

      "wklei# za########## ja###"

        Activity

        Hide
        Damian Steer added a comment -

        Seems a bit wonky, but functional to me:

        irb(main):001:0> "wklei? za?#?? g??l? ja??"
        => "wklei\304\207 za\305\274\303\263\305\202\304\207 g\304\231\305\233l\304\205 ja\305\272\305\204"
        irb(main):002:0> puts "wklei? za?#?? g??l? ja??"
        wkleić zażłć gęślą jaźń
        

        The input line issue is a jline issue, I suspect.

        Show
        Damian Steer added a comment - Seems a bit wonky, but functional to me: irb(main):001:0> "wklei? za?#?? g??l? ja??" => "wklei\304\207 za\305\274\303\263\305\202\304\207 g\304\231\305\233l\304\205 ja\305\272\305\204" irb(main):002:0> puts "wklei? za?#?? g??l? ja??" wkleić zażłć gęślą jaźń The input line issue is a jline issue, I suspect.
        Hide
        Damian Steer added a comment -

        Noformat messed that up:

        irb(main):001:0> "wklei? za?#?? g??l? ja??"
        => "wklei\304\207 za\305\274\303\263\305\202\304\207 g\304\231\305\233l\304\205 ja\305\272\305\204"
        irb(main):002:0> puts "wklei? za?#?? g??l? ja??"
        wkleić zażłć gęślą jaźń

        Show
        Damian Steer added a comment - Noformat messed that up: irb(main):001:0> "wklei? za?#?? g??l? ja??" => "wklei\304\207 za\305\274\303\263\305\202\304\207 g\304\231\305\233l\304\205 ja\305\272\305\204" irb(main):002:0> puts "wklei? za?#?? g??l? ja??" wkleić zażłć gęślą jaźń
        Hide
        Charles Oliver Nutter added a comment -

        Unfortunately I think this is a side effect of readline. Ruby 1.8 and 1.9 have the same problems displaying unicode characters in IRB. If you run this in a script it should all work ok, or if you run with --noreadline it will type and paste correctly. We'd love for someone to shag down a fix for readline, but at the moment nobody has a solution for this.

        Show
        Charles Oliver Nutter added a comment - Unfortunately I think this is a side effect of readline. Ruby 1.8 and 1.9 have the same problems displaying unicode characters in IRB. If you run this in a script it should all work ok, or if you run with --noreadline it will type and paste correctly. We'd love for someone to shag down a fix for readline, but at the moment nobody has a solution for this.
        Hide
        Jaroslaw Zabiello added a comment -

        Charles, this problem is solved in CRuby 1.8, see: http://henrik.nyh.se/2008/03/irb-readline. Ruby 1.9 RC1 has no problems at all.

        Show
        Jaroslaw Zabiello added a comment - Charles, this problem is solved in CRuby 1.8, see: http://henrik.nyh.se/2008/03/irb-readline . Ruby 1.9 RC1 has no problems at all.
        Hide
        Charles Oliver Nutter added a comment -

        Actually I realized that the "jline" library we use does not actually use readline, so this is in theory something we could fix. But it would require fixes to jline, which has sat around a long time.

        Really I'd like to be able to just use the same readline library MRI uses by calling it through FFI. Perhaps someone has done that or would like to do it?

        Reopening, since it appears there may be a way to fix it.

        Show
        Charles Oliver Nutter added a comment - Actually I realized that the "jline" library we use does not actually use readline, so this is in theory something we could fix. But it would require fixes to jline, which has sat around a long time. Really I'd like to be able to just use the same readline library MRI uses by calling it through FFI. Perhaps someone has done that or would like to do it? Reopening, since it appears there may be a way to fix it.
        Hide
        Charles Oliver Nutter added a comment -

        I'm going to mark this a duplicate of JRUBY-2126, which illustrates the same problem. For the record, it is a JLine bug, so it would need to be fixed there.

        Show
        Charles Oliver Nutter added a comment - I'm going to mark this a duplicate of JRUBY-2126 , which illustrates the same problem. For the record, it is a JLine bug, so it would need to be fixed there.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Daniel Dettlaff
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: