ruby-****@sourc*****
ruby-****@sourc*****
2012年 1月 17日 (火) 03:51:06 JST
------------------------- REMOTE_ADDR = 184.145.90.60 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AFileChooser ------------------------- @@ -7,7 +7,7 @@ === File Names and Encodings When the user is finished selecting files in a Gtk::FileChooser, your program can get the selected names either as filenames or as URIs. For URIs, the normal escaping rules are applied if the URI contains non-ASCII characters. However, filenames are always returned in the character set specified by the G_FILENAME_ENCODING environment variable. Please see the Glib documentation for more details about this variable. -==== Important +==== Important: This means that while you can pass the result of Gtk::FileChooser#filename to open(2) or fopen(3), you may not be able to directly set it as the text of a Gtk::Label widget unless you convert it first to UTF-8, which all GTK+ widgets expect. You should use GLib.filename_to_utf8 to convert filenames into strings that can be passed to GTK+ widgets.