[Bug:trunk] startup failure with non-ascii path

e$B$J$+$@$G$9!#e(B

ocraの動作と、エラーの原因を考えてみる - mirichiの日記 e$B$N$h$&$K!"<B9T%U%!%$%ke(B
e$B$N%Q%9$Ke(Bnon-asciie$BJ8;z$,4^$^$l$F$$$k$He(Bencdbe$B$N%m!<%I$N:]$K<:GT$7$Fe(B
e$B5/F0$G$-$^$;$s!#e(B

$ q=e$B$“e(B
$ mkdir $q
$ ln libruby.1.9.1.* ruby $q
$ DYLD_LIBRARY_PATH=”$q" $q/ruby
internal:prelude:3:in require': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError) from <internal:prelude>:3:in block in ’
from internal:prelude:1:in each' from <internal:prelude>:1:in

file_expand_path()e$B$G@dBP%Q%9$r%3%T!<$9$k$H$-$Ke(Bencodinge$B$r%3%T!<$7e(B
e$B$F$$$J$$$h$&$G$9!#e(B

Index: file.c

— file.c (revision 23669)
+++ file.c (working copy)
@@ -2794,4 +2794,5 @@ file_expand_path(VALUE fname, VALUE dnam
BUFCHECK(bdiff >= buflen);
memset(buf, ‘/’, p - buf);

  • rb_enc_copy(result, fname);
    }
    if (p > buf && p[-1] == ‘/’)

e$B%A%1%C%He(B #1614 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r23670.

http://redmine.ruby-lang.org/issues/show/1614

e$B%A%1%C%He(B #1614 e$B$,99?7$5$l$^$7$?!#e(B (by Yuki S.)

e$BC4Ev<Te(B Nobuyoshi N.e$B$K%;%C%He(B

applied in a changeset.

http://redmine.ruby-lang.org/issues/show/1614

e$B%o%J%Y$H?=$7$^$9!#e(B

2009/06/12 14:51 e$B$Ke(B Nobuyoshi N.[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

e$B$J$+$@$G$9!#e(B

ocraの動作と、エラーの原因を考えてみる - mirichiの日記 e$B$N$h$&$K!"<B9T%U%!%$%ke(B
e$B$N%Q%9$Ke(Bnon-asciie$BJ8;z$,4^$^$l$F$$$k$He(Bencdbe$B$N%m!<%I$N:]$K<:GT$7$Fe(B
e$B5/F0$G$-$^$;$s!#e(B
e$B!JCfN,!Ke(B
memset(buf, ‘/’, p - buf);

  •   rb_enc_copy(result, fname);
    
    }
    if (p > buf && p[-1] == ‘/’)

e$B%(%s%3!<%G%#%s%0$N$3$H$OA4$/$o$+$i$J$$$N$G$9$,!"$b$7$+$7$?$iF14X?tCf$Ne(B
/* skip drive letter
*/e$B!!$NItJ,$G$bF1MM$N=hM}$,I,MW$K$J$k$N$G$O$J$$$G$7$g$&$+!#e(B