From: Lui Kore Date: 2010-01-17T15:13:26+09:00 Subject: Re: Strange Encoding Behavior I think #1685 is a little bit different. Maybe the following code is a bit clearer: # coding: ascii-8bit puts Encoding.default_external #=> GBK def enc s s.encode 'utf-8', Encoding.default_external end p1 = File.expand_path File.dirname __FILE__ p2 = p1.dup p2.force_encoding p2.encoding # strange, but makes it different puts p1 == p2 #=> true puts p1.encoding == p2.encoding #=> true puts enc(p1) == enc(p2) #=> sometimes false ??? Run in console: D:\其他>ruby t.rb GBK true true false put it in another folder: D:\other>ruby t.rb GBK true true true Luis Lavena wrote: > On Jan 17, 12:55�am, Lui Kore wrote: >> � � � #=> "1.9.1 i386-mingw32" is my ruby version >> � � � # changed at last > At 1.9.1, and some part of 1.9.2 still display certain issues with > path/folders with non-ascii characters: > > http://redmine.ruby-lang.org/issues/show/1685 -- Posted via http://www.ruby-forum.com/.