From: Bill Kelly Date: 2010-05-06T21:38:19+09:00 Subject: [ruby-core:30054] Re: [Bug #1685] Some windows unicode path issues remain Hi, U.Nakamura wrote: > > In message "[ruby-core:30052] Re: [Bug #1685] Some windows unicode path issues remain" > on May.06,2010 19:39:27, wrote: >> This works, in terms of returning a UTF-8 path string; however, >> rb_dir_getwd calls rb_enc_associate(cwd, rb_filesystem_encoding()) >> on the result, associating the WINDOWS-1252 encoding instead of >> UTF-8. >> >> So, I would like to ask: is there a reason >> enc_set_filesystem_encoding() should not return UTF-8 now for >> Windows? > > For compatibility. > > I will not change filesystem encoding in Windows in 1.9 series. > In all methods which returns filenames, the default encoding > of returned value must be filesystem encoding. > So, if someone want to get filename with another encoding, he/she > should specify the encoding by some way. > Of course, it is necessary to decide the "some way" of each > methods. Ah. So my rb_w32_ugetcwd patch is not very useful, at present, since there is no "some way" to specify the encoding via Dir.pwd. May I suggest a new command line flag for this purpose: ruby --DEAR_GOD_WORK_WITH_UTF_8_DAMN_IT ;) Well then, this becomes a philosophical question at this point, but in an effort to better understand, I am wondering: How does it break compatibility, if we allow filesystem encoding to become UTF-8 when rb_default_external_encoding is UTF-8? Do we have evidence that anyone has written scripts that will break in such a case? (And if so, can we agree to summon the fleas of a thousand camels to infest their undergarments?) >> Also, my bootstraptest encountered one more problem. The mktmpdir >> can't delete the unicode directory entries created by my test: > > Yes, I know it. > This is the problem of globbing. > I've already decided to solve this problem 1.9.3 or later. OK. I admit I don't understand why it's considered a globbing problem. Does the UTF-8 support somehow make the globbing more difficult? I thought it was just the same situation as above: a filesystem encoding problem? Regards, Bill