[Bug:1.9] default_external depends on the order of -K and -E

e$B$3$s$K$A$Oe(B sheepman e$B$G$9!#e(B

Encoding.default_external e$B$Oe(B -K e$B%%W%7%g%s$He(B -E
e$B%
%W%7%g%s$Ne(B
e$B=gHV$K0MB8$9$k$h$&$G$9$,!"$3$&$$$&$b$N$J$s$G$7$g$&$+!#e(B

$ ruby-1.9 -v
ruby 1.9.0 (2008-08-03 revision 17593) [i686-linux]

$ ruby-1.9 -Ke -Eutf-8 -e ‘p Encoding.default_external’
#Encoding:UTF-8

$ ruby-1.9 -Eutf-8 -Ke -e ‘p Encoding.default_external’
#Encoding:EUC-JP

[email protected]@%$G$9!#e(B

sheepman wrote:

$ ruby-1.9 -Eutf-8 -Ke -e ‘p Encoding.default_external’
#Encoding:EUC-JP

e$B$o$?$7$NM}2r$G$O!"e(B

  • -K e$B$He(B -E e$B$NM%@hEY$OF10le(B
  • e$B$f$($K!"8e$N$b$N$G>e=q$-e(B
    e$B$G$9!#e(B

[email protected]!"e(B-K e$B$He(B -E
e$B$OK\MhF1;~;XDj$9$k$b$N$G$O$J$$$h$&$K;W$&$N$G!"e(B
e$B!V;EMM!W$H$7$F$O!“F1;~;XDj$N>l9g$NF0:n$OL$Dj5A!”$G$b$$$$$+$b$7$l$^$;$s$,!#e(B

Yuguie$B$G$9!#e(B

NARUSE, Yui e$B$5$s$O=q$-$^$7$?e(B:

[email protected]!"e(B-K e$B$He(B -E e$B$OK\MhF1;~;XDj$9$k$b$N$G$O$J$$$h$&$K;W$&$N$G!"e(B
e$B!V;EMM!W$H$7$F$O!“F1;~;XDj$N>l9g$NF0:n$OL$Dj5A!”$G$b$$$$$+$b$7$l$^$;$s$,!#e(B

e$BF1;~$K;XDj$7$?>l9g$HJ#?t2s;XDj$7$?>l9g$O!VL$Dj5A!W$K0lI<e(B

e$B9bHx9(<#$G$9!#e(B

On 2008/08/03, at 17:59, Yugui (Yuki S.) wrote:

NARUSE, Yui e$B$5$s$O=q$-$^$7$?e(B:

[email protected]!"e(B-K e$B$He(B -E e$B$OK\MhF1;~;XDj$9$k$b$N$G$O$J$$$h$&$K;W$&$N$G!"e(B
e$B!V;EMM!W$H$7$F$O!“F1;~;XDj$N>l9g$NF0:n$OL$Dj5A!”$G$b$$$$$+$b$7$l$^$;$s$,!#e(B

e$BF1;~$K;XDj$7$?>l9g$HJ#?t2s;XDj$7$?>l9g$O!VL$Dj5A!W$K0lI<e(B

e$B$I$A$i$rM%@h$9$k$H$+$$$&0U8+$O$J$$$N$G$9$,!"e(B
rubye$B$N;EMM$H$7$FL$Dj5A$H$9$k>l9g!"e(BRubye$B$N%f!<%[email protected]@$,LLE]$H$+!“e(B
e$B%F%9%H$,=q$1$J$$$H$$$&LdBj$O$J$$$G$7$g$&$+!#e(B
e$B;d$N$3$l$^[email protected]$HDj5A$7$F$*$$$?$[$&$,3Z$H$$$&G’<1$,$”$j$^$9!#e(B

[email protected]@%$G$9!#e(B

Takao K. wrote:

e$B%F%9%H$,=q$1$J$$$H$$$&LdBj$O$J$$$G$7$g$&$+!#e(B
e$B;d$N$3$l$^[email protected]$HDj5A$7$F$*$$$?$[$&$,3Z$H$$$&G’<1$,$"$j$^$9!#e(B

e$B$U!<$`!"[email protected]$H$H$j$"$($:Nc30$G$9$+$M$’!#e(B

— ruby.c (revision 18324)
+++ ruby.c (working copy)
@@ -792,6 +792,8 @@ proc_options(int argc, char **argv, stru
}
if (enc_name) {
opt->src.enc.name = rb_str_new2(enc_name);

  •               if (opt->ext.enc.name)
    
  •                   rb_raise(rb_eRuntimeError, "duplicate argument 
    

for default external");
opt->ext.enc.name = opt->src.enc.name;
}
s++;
@@ -878,6 +880,8 @@ proc_options(int argc, char **argv, stru
}
}
encoding:

  •           if (opt->ext.enc.name)
    
  •               rb_raise(rb_eRuntimeError, "duplicate argument for 
    

default external");
opt->ext.enc.name = rb_str_new2(s);
}
else if (strcmp(“version”, s) == 0)

At 17:59 08/08/03, you wrote:

Yuguie$B$G$9!#e(B

NARUSE, Yui e$B$5$s$O=q$-$^$7$?e(B:

[email protected]!"e(B-K e$B$He(B -E e$B$OK\MhF1;~;XDj$9$k$b$N$G$O$J$$$h$&$K;W$&$N$G!"e(B
e$B!V;EMM!W$H$7$F$O!“F1;~;XDj$N>l9g$NF0:n$OL$Dj5A!”$G$b$$$$$+$b$7$l$^$;$s$,!#e(B

e$BF1;~$K;XDj$7$?>l9g$HJ#?t2s;XDj$7$?>l9g$O!VL$Dj5A!W$K0lI<e(B

e$B$3$A$i$b0lI<$G$9$,!":G6a$Ne(B RubySpec
e$B$N!V2?$G$b$O$C$-$j7h$a$k!We(B
e$B$K$O$I$&$d$C$FEA$($l$P$$$$$G$7$g$&$+!#e(B

e$B59$7$/$*4j$$$7$^$9!#e(B Martin.

#-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-# http://www.sw.it.aoyama.ac.jp mailto:[email protected]

[email protected]$G$9!#e(B

At Sun, 3 Aug 2008 21:13:27 +0900,
NARUSE, Yui wrote in [ruby-dev:35750]:

On 2008/08/03, at 17:59, Yugui (Yuki S.) wrote:

NARUSE, Yui e$B$5$s$O=q$-$^$7$?e(B:

[email protected]!"e(B-K e$B$He(B -E e$B$OK\MhF1;~;XDj$9$k$b$N$G$O$J$$$h$&$K;W$&$N$G!"e(B
e$B!V;EMM!W$H$7$F$O!“F1;~;XDj$N>l9g$NF0:n$OL$Dj5A!”$G$b$$$$$+$b$7$l$^$;$s$,!#e(B
e$BF1;~$K;XDj$7$?>l9g$HJ#?t2s;XDj$7$?>l9g$O!VL$Dj5A!W$K0lI<e(B

e$B:G8e$rM%@h$K0lI<!#e(B

e$B8=:e(B-Ie$B$N$h$&$KJ#?t2s;XDj$7$?$b$N$,$9$Y$FM-8z$K$J$k%*%W%7%g%s0J30e(B
e$B$O$9$Y$F:G8e$N$
$,M-8z$G$9!#$"$($Fe(B-Ke$B$He([email protected][email protected]$r<N$F$F0c$&e(B
e$BF0:n$rDI2C$9$kI,A3$O$J$$$h$&$K;W$$$^$9!#e(B

e$B$I$A$i$rM%@h$9$k$H$+$$$&0U8+$O$J$$$N$G$9$,!"e(B
rubye$B$N;EMM$H$7$FL$Dj5A$H$9$k>l9g!"e(BRubye$B$N%f!<%[email protected]@$,LLE]$H$+!“e(B
e$B%F%9%H$,=q$1$J$$$H$$$&LdBj$O$J$$$G$7$g$&$+!#e(B
e$B;d$N$3$l$^[email protected]$HDj5A$7$F$*$$$?$[$&$,3Z$H$$$&G’<1$,$”$j$^$9!#e(B

e$B$U!<$`!"[email protected]$H$H$j$"$($:Nc30$G$9$+$M$’!#e(B

RUBYOPTe$B$r%3%^%s%I%i%$%s$G>e=q$-$G$-$J$/$J$j$^$9!#e(B

Nobuyoshi N. wrote:

e$B:G8e$rM%@h$K0lI<!#e(B
e$B$3$l$C$F!"e(B-K euc-jp -E utf-8 e$B$N;~$K$O!"e(B

  • script encoding e$B$N%G%U%)%k%H$Oe(B EUC-JP
  • default external e$B$Oe(B UTF-8
    e$B$K$J$k$s$G$9$+$M!#e(B

-E
e$B$N0UL#$,A}$($?>l9g$K$3$N$"$?$j$N%k!<%k$,J#;(2=$9$k$N$,>/$7I]$$$N$G$9!#e(B
e$B$^$!!"e(B-E e$B$,F~=PNO$7$+4^$^$J$$J,$O0B?4$J$N$G$9$,!#e(B

RUBYOPTe$B$r%3%^%s%I%i%$%s$G>e=q$-$G$-$J$/$J$j$^$9!#e(B
e$B$J$k$[$I!#e(B

e$B%A%1%C%He(B #402 e$B$,99?7$5$l$^$7$?!#e(B (by Yui NARUSE)

-K e$B$Oe(B default source encoding e$B$He(B default_external
e$B$r>e=q$-!"e(B
-E e$B$Oe(B default_external e$B$r>e=q$-!“e(B
e$B8e$N$b$N$,M%@h!”$G9T$-$^$7$g$&!#e(B

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs