jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-3168

Ruby File and Dir cant using non-english path

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.4, JRuby 1.1.5
  • Fix Version/s: None
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Environment:
    Windows XP sp2(traditional chinese), jruby1.1.5, jruby 1.1.4 with netbeans6.5
  • Testcase included:
    yes

Description

found this problem when creating a project in chinese path name.
like 'D:/我的文件/RubyApplication12'
then it shows cant find rake tasks.

the problem occurs at rake.rb's Dir.chdir.

so i try to test File.open and Dir.chdir in jruby.
test code:
file = File.open("D:\\我的文件
test.txt")
file.each() { |line|
puts line # can print the content in the test.txt
}
puts file.path # print D:????\test.txt
puts Dir.pwd #print D:/我的文件/RubyApplication12/lib
Dir.chdir("D:
我的文件") # error->D:??\RubyApplication12\lib\main.rb:13:in `chdir': No such file or directory - No such file or directory - D:???§?????????????? (Errno::ENOENT)

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    main.rb
    19/Nov/08 9:13 PM
    0.2 kB
    koji lin

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. JRUBY-2812 Problems in getting access to files who has Chinese charactors in name.

  • Major - Major loss of function.
  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
koji lin added a comment - 19/Nov/08 9:13 PM

a little test case

Show
koji lin added a comment - 19/Nov/08 9:13 PM a little test case
Hide
Permalink
Kjetil Dynnamitt added a comment - 12/Jan/09 8:40 AM

Another test case that fails on 1.1.6 (ubuntu 8.04) :

$ touch זרו.txt
$ jirb

>Dir.new('.').each { |f| puts f }
.
..
���.txt

Show
Kjetil Dynnamitt added a comment - 12/Jan/09 8:40 AM Another test case that fails on 1.1.6 (ubuntu 8.04) : $ touch זרו.txt $ jirb >Dir.new('.').each { |f| puts f } . .. ���.txt
Hide
Permalink
Charles Oliver Nutter added a comment - 20/Jan/09 1:59 AM

There is another bug for Dir-related encoding-related failures. Can you try to hunt that down and perhaps clean up the patch there? Last time I checked it solved many issues, but broke a number of tests too. As a result, we were only able to apply part of it.

Show
Charles Oliver Nutter added a comment - 20/Jan/09 1:59 AM There is another bug for Dir-related encoding-related failures. Can you try to hunt that down and perhaps clean up the patch there? Last time I checked it solved many issues, but broke a number of tests too. As a result, we were only able to apply part of it.
Hide
Permalink
Hiro Asari added a comment - 31/Dec/11 11:10 AM

This seems to work now on master. https://gist.github.com/1544598

Reopen if it is still a problem.

Show
Hiro Asari added a comment - 31/Dec/11 11:10 AM This seems to work now on master. https://gist.github.com/1544598 Reopen if it is still a problem.

People

  • Assignee:
    Hiro Asari
    Reporter:
    koji lin
Vote (1)
Watch (2)

Dates

  • Created:
    19/Nov/08 9:12 PM
    Updated:
    31/Dec/11 11:10 AM
    Resolved:
    31/Dec/11 11:10 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.