From: Bill Kelly Date: 2010-05-05T15:35:11+09:00 Subject: [ruby-core:30012] Re: [Bug #1685] Some windows unicode path issues remain U.Nakamura wrote: > Hello, > > In message "[ruby-core:29892] Re: [Bug #1685] Some windows unicode path issues remain" > on Apr.30,2010 08:12:33, wrote: > | > | If there is no conflict with others' work, I would like to > | attempt merging the win32-unicode branch into trunk within > | the next week or two. > > Ah, I've merged most parts of win32-unicode-test branch because > the time limit of code freeze (Apr.30) has come. > # See r27570 Oh! Thank you very much! (I had thought the code freeze applied to new features, rather than bug fixes.) > Of course, test cases and bug reports are welcomed. My initial attempt at a bootstraptest for unicode path support is failing. It is incomplete, but I uploaded the current version: http://redmine.ruby-lang.org/attachments/download/910 It is failing at: DNAME_CHINESE = "\u52ec\u52ee\u52f1\u52f2" Dir.mkdir DNAME_CHINESE test(?d, DNAME_CHINESE) or raise "test ?d fail" It seems rb_stat in file.c calls stat(), but stat does not map to the unicode version. win32.h: #define stat(path,st) rb_w32_stat(path,st) file.c: static int rb_stat(VALUE file, struct stat *st) { VALUE tmp; rb_secure(2); tmp = rb_check_convert_type(file, T_FILE, "IO", "to_io"); if (!NIL_P(tmp)) { rb_io_t *fptr; GetOpenFile(tmp, fptr); return fstat(fptr->fd, st); } FilePathValue(file); file = rb_str_encode_ospath(file); return stat(StringValueCStr(file), st); } Regards, Bill