From: Nikolai Weibull Date: 2011-12-20T16:59:39+09:00 Subject: [ruby-core:41744] Re: Feature : optional argument in File.join On Tue, Dec 20, 2011 at 08:17, Nobuyoshi Nakada wrote: > (11/12/20 15:55), Nikolai Weibull wrote: >> On Tue, Dec 20, 2011 at 02:12, Nobuyoshi Nakada wrote: >>>> http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AFileSelection >>>> >>>> which says : >>>> >>>> filename=(filename) >>>> �� �� Sets a default path for the file requestor. If filename includes a >>>> directory path, then the requestor will open with that path as its >>>> current working directory. The encoding of filename is the on-disk >>>> encoding, which may not be UTF-8. See GLib.filename_from_utf8. >>> It's a bug of that ruby binding. ��It should absorb such platform >>> differences. >> Well, it���s actually a problem with Gtk, not the Ruby binding for it. > I meant, if Gtk doesn't accept slashes as file separators, then the > binding library has to convert them. It isn���t the binding���s job to perform such platform-specific conversions. This is, as far as I can tell, a misfeature in Gtk that should be fixed there, not in the bindings. More importantly, however, is that Gtk::FileSelection has been superseded by Gtk::FileChooser, so I don���t think that the Gtk developers will work on this. Gtk::FileChooser seems to support slashes: require 'gtk2' Gtk::FileChooserDialog.new.set_filename('/Windows').show_all Gtk.main