Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.5
    • Fix Version/s: JRuby 1.6.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_01) [Windows 7-amd64-java]
    • Number of attachments :
      0

      Description

      the result of jruby --1.9 -e 'puts Gem.user_home' is garbled, see below

      C:\>chcp
      Active code page: 1252
      
      C:\>echo %USERPROFILE%
      C:\Users\xxx
      
      C:\>ruby --version && ruby -e 'puts Gem.user_home'
      ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
      C:/Users/xxx
      
      C:\>jruby --version && jruby --1.9 -e 'puts Gem.user_home'
      jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_01) [Win
      dows 7-amd64-java]
      C:/C:₩Users₩xxx
      
      C:\>
      

        Activity

        Hide
        ryenus added a comment -
        [04:28:36 roger@R /forks/jcodings (fix-gbk)]
        $ cp target/jcodings.jar /sandbox/jruby/build_lib/jcodings.jar
        
        [04:29:08 roger@R /sandbox/jruby (master)]
        $ ant clean jar
        Buildfile: E:\sandbox\jruby\build.xml
        ...
        BUILD SUCCESSFUL
        Total time: 1 minute 58 seconds
        
        [04:31:12 roger@R /sandbox/jruby (master)]
        $ java -jar lib/jruby.jar --1.9 -e "puts File.expand_path '~'"
        C:/Users/roger
        
        [04:31:42 roger@R /sandbox/jruby (master)]
        $ java -Dfile.encoding=gbk -jar lib/jruby.jar --1.9 -e "puts File.expand_path '~'"
        C:/Users/roger
        

        Oh, yeah!

        Show
        ryenus added a comment - [04:28:36 roger@R /forks/jcodings (fix-gbk)] $ cp target/jcodings.jar /sandbox/jruby/build_lib/jcodings.jar [04:29:08 roger@R /sandbox/jruby (master)] $ ant clean jar Buildfile: E:\sandbox\jruby\build.xml ... BUILD SUCCESSFUL Total time: 1 minute 58 seconds [04:31:12 roger@R /sandbox/jruby (master)] $ java -jar lib/jruby.jar --1.9 -e "puts File.expand_path '~'" C:/Users/roger [04:31:42 roger@R /sandbox/jruby (master)] $ java -Dfile.encoding=gbk -jar lib/jruby.jar --1.9 -e "puts File.expand_path '~'" C:/Users/roger Oh, yeah!
        Hide
        Hiro Asari added a comment -

        OK, I merged the pull request. I am not familiar with the release procedure for jcodings, so I'll let Tom and Marcin take care of that. Until the fix is released (I suppose it will be jcodings 1.0.7), the only way to get the fix is to build jruby from source after copying it to build_lib.

        Show
        Hiro Asari added a comment - OK, I merged the pull request. I am not familiar with the release procedure for jcodings, so I'll let Tom and Marcin take care of that. Until the fix is released (I suppose it will be jcodings 1.0.7), the only way to get the fix is to build jruby from source after copying it to build_lib.
        Hide
        ryenus added a comment -

        What about a test, e.g.: https://gist.github.com/1808755

        Show
        ryenus added a comment - What about a test, e.g.: https://gist.github.com/1808755
        Hide
        ryenus added a comment - - edited

        tested with fresh 1.6.7 release, problem fixed. this should have been in 1.6.7 changelog

        Show
        ryenus added a comment - - edited tested with fresh 1.6.7 release, problem fixed. this should have been in 1.6.7 changelog
        Hide
        Charles Oliver Nutter added a comment -

        ryenus: Thank you for following up!

        Show
        Charles Oliver Nutter added a comment - ryenus: Thank you for following up!

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            ryenus
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: