diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib index 83e948edd8..34954ebaa2 100644 --- a/ext/tk/ChangeLog.tkextlib +++ b/ext/tk/ChangeLog.tkextlib @@ -1,3 +1,8 @@ +2005-03-31 Hidetoshi NAGAI + + * sample/tkextlib/iwidgets/sample/hierarchy.rb: fail to treat + Japanese (i18n?) filenames. + 2005-03-30 Hidetoshi NAGAI * sample/tkextlib/bwidget/tree.rb: use 'return' in the Proc object. diff --git a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb b/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb index c83ae37248..9e44176696 100644 --- a/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb +++ b/ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb @@ -3,11 +3,11 @@ require 'tk' require 'tkextlib/iwidgets' def get_files(file) - dir = (file.empty?)? ENV['HOME'] : file + dir = (file.empty?)? ENV['HOME'] : TkComm._fromUTF8(file) Dir.chdir(dir) rescue return '' - rlist = [] - Dir['*'].sort.each{|f| rlist << File.join(dir, f) } - rlist + Dir['*'].sort.collect{|f| + TkCore::INTERP._merge_tklist(TkComm._toUTF8(File.join(dir, f))) + } end Tk::Iwidgets::Hierarchy.new(:querycommand=>proc{|arg| get_files(arg.node)},