At 21:07 08/06/24, Akinori MUSHA wrote:
At Tue, 24 Jun 2008 01:38:47 +0900,
matz wrote:
In message “Re: [ruby-dev:35210] Re: IncompatibleEncodingError”
on Tue, 24 Jun 2008 01:31:50 +0900, “NARUSE, Yui” [email protected]
writes:
|Encoding::IncompatibleError < StandardError
e$B!!$[$+$Ke(B Encoding e$B4X78$N%(%i!<$rDI2C$9$k$H$-$be(B StandardError e$B$Ne(B
e$BD>2<$K$V$i$5$2$k$s$G$7$g$&$+!#e(B
e$B!!e(BIncompatibleEncodingError e$B$C$F$N$Oe(B Encoding e$B4X78$GJ#?t$NNc30$re(B
e$B6hJL$9$kI,MW$,@8$8$F$+$i$G$h$$$N$G!“$H$j$”$($:e(B
class EncodingError < StandardError; end
e$B$@$1F3F~$9$k$N$O$I$&$G$7$g$&$+!#e(B
Encoding e$B$He(B transcode e$B$r0l=o$K$7$?J}$,$$$$$H9M$($k$H!"e(B
e$B8=:_0lHLE*$JNc30$K$J$C$F$$$ke(B transcode.c e$BFb$N0lIt$N$H$3$m$be(B
Encoding:: e$B2<$KF~$l$k$3$H$,9M$($i$l$k!#e(B
e$B8=:_$Ne(B transcode.c e$BFb$Ne(B rb_raise
e$B$rJ,@O$7$^$9$H<!$NDL$j$K$J$j$^$9e(B:
rb_raise(rb_eArgError, "transcoder from %s to %s has been
already registered",
e$BFbIt%(%i!<$_$?$$$J$b$N$G!"<oN`$O$=$l$[$I5$$K$7$J$/$F$$$$!#e(B
rb_raise(rb_eArgError, "invalid library name - %s",
e$BFbIt%(%i!<$_$?$$$J$b$N$G!"<oN`$O$=$l$[$I5$$K$7$J$/$F$$$$!#e(B
rb_raise(rb_eRuntimeError /*@@@change exception*/, "conversion
undefined for byte sequence (maybe invalid byte sequence)“);
e$BJQ49$,L$Dj5A$G!”$3$3$Oe(B Encoding::UndefinedCharacterError
e$B$H$+=P$O$I$&$G$7$g$&$+!#e(B
e$BE57?Nc$Oe(B UTF-8 e$B$+$iNc$($Pe(B EUC-JP e$B$X$NJQ49$G!"e(BEUC-JP
e$B$GI=8=$G$-$J$$J8;z$N>l9g!#e(B
rb_raise(rb_eArgError, "unknown value for invalid: setting");
e$B85$N%G!<%?$KLdBj$,$“$k$H$$$&$3$H$G!”$3$l$OB>$N$H$3$m$GF1$8%(%i!<$,=P$k$He(B
e$B0l=o$K$7$?$$$H;W$$$^$9!#E57?Nc$Oe(B UTF-8 e$B$Ge(B UTF-8
e$B=P$J$$%P%$%HNs$J$I!#e(B
rb_raise(rb_eArgError, "wrong number of arguments (%d for
1…2)", argc);
e$B$3$l$Oe(B encode e$B%a%>%I$KEj$2$?0z?t$N?t$,0c$&$H$$$&$3$H$G!"B?J,e(B
ArgError e$B$G$$$$$@$m$&!#e(B
rb_raise(rb_eArgError, "transcoding not supported (from %s to
%s)“, from_e, to_e);
e$B$3$l$O3d$j$He(B rescue e$B$9$k$N$,B?$$$N$G$O$J$$$+$H;W$$$^$9e(B
(e$BNc$($P2?$+FC<l$Je(B encoding
e$B$XJQ49$7$F$$F!"$3$l$,$@$a$G$7$?$iF1$87ONs$N$b$C$H%Y!<%8%C%/$J$b$N$r$d$C$F$$k$H$+e(B)
e$B$J$N$G!”$b$7$+$7$F6hJL$7$F$b$$$$$N$+$J!#e(B
rb_raise(rb_eArgError, "not fully converted, %td bytes left",
sp+slen-fromp);
e$B$3$l$OJ8;z$,ESCf$G@Z$i$l$F$$$k>l9g$J$I5/$3$j$^$9$N$G!"e(BEncoding::
e$B2<$G$$$$$H;W$$$^$9!#e(B
e$B%"%I%P%$%9$r59$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]