In article [email protected],
KOSAKI Motohiro [email protected] writes:
APIe$B$H$7$F$N6Z$NNI$5$H$OJLN)$F$H$7$F!“e(Bjavascripte$B$Ge(Bencode or decodee$B$9$k$N$Ge(B
e$B$^$C$?$/F1$8;HMQ$Ne(Bencocde/decodee$B4X?t$,e(BRubye$B$K$b$”$k$H$&$l$7$$!#e(B
e$B$H$$$&$N$O$"$k$+$be(B
encodeURI e$B$N=PNO$+$i!"F~NO$rF@$k$K$O!"L5:9JL$Ke(B %-encoding e$B$re(B
e$B2r$1$P$$$$$N$G!"e(BdecodeURI
e$B$G$J$/$F$b$$$$$s$8$c$J$$$G$7$g$&$+!#e(B
decodeURIComponent e$B$G$b$$$$$G$9$7!"e(BCGI.unescape e$B$G$b$+$^$$$^e(B
e$B$;$s!#e(B
decodeURI e$B$O!“e(BencodeURI e$B$,@8@.$9$ke(B %-encoding
e$B$O$9$Y$F2r$-$^e(B
e$B$9$,!”$=$&$G$J$$e(B %-encoding e$B$r0lIt2r$+$J$$$3$H$,$“$k$h$&$G$9e(B
e$B$,!”$3$l$O2?$NLr$KN)$D$N$+$J$!e(B?
(e$BNc$($P!“e(BdecodeURI(”%40") e$B$,e(B “%40” e$B$K$J$k$H$+!#e(B)
e$B$"$H!“e(BencodeURIComponent()e$B$O!”$=$NL>$NDL$je(BURIe$B$N8D!9$N%3%s%]!<%M%s%H$re(B
e$B0z?t$K<h$k;v$rG0F,$K$*$$$?4X?t$G!"e(Bjavascripte$B$G$Oe(BStringe$B7?$7$+$J$$$+$i!“e(B
URIe$B$r%3%s%]!<%M%s%H$KJ,3d$9$k@UL3$rMxMQ<T$KEj$2$F$$$k!#e(B
URIe$B7?$r:n$k$J$i!”$b$&$A$g$C$H%$%s%F%j%8%'%s%H$K$d$C$FM_$7$$$H$$$&5$$b$7$J$/$O$J$$$+$b!#e(B
e$B$h$/CN$i$J$$$1$I!“e(BURI.split()e$B$,$”$k$+$i$K$O!"e(BURIe$B$N9=B$$r$7$C$F$k%/%i%9$J$s$G$9$h$M!)$3$N?M!#e(B
encodeURIComponent e$B$O4pK\E*$J9M$(J}$H$7$F$O0-$/$J$$$H;W$$$^e(B
e$B$9!#e(B! e$B$J$I$,$=$N$^$^$J$N$O4E$$$H;W$$$^$9$,!"8E$$e(B RFC
e$B$N1F6Ae(B
e$B$G$7$g$&$M!#:#$@$C$?$ie(B unreserved e$B0J30$r0lN’$Ke(B %-encoding
e$B$Ke(B
e$B$7$F$7$^$&$N$,$$$$$G$7$g$&!#e(B
URI e$B%/%i%9$,e(B URI
e$B$N9=B$$rCN$C$F$$$k$N$O$=$N$H$*$j$J$s$G$9$,!"e(B
e$BLdBj$Oe(B URI e$B$N0UL#$,$$$m$$$m$HJ8L.0MB8$J$H$3$m$G$9$M!#e(B
e$B$?$H$($P!“e(BHTTP URI e$B$Ne(B query e$B$N0UL#$O!”<u$1<h$ke(B web
application e$B$NF0:n$K0MB8$7$^$9!#$?$H$($P!“e(B& e$B$He(B %26
e$B$rF10l;ke(B
e$B$7$F$$$$$+!”$=$&$G$J$$$N$+$O!"e(Bweb application
e$B$NF0:n<!Bh$G$9!#e(B
e$B$=$&$$$&$o$1$G!"e(BURI e$B%/%i%9$K$O!“e(B& e$B$He(B %26
e$B$r6hJL$7$F;XDj$G$-e(B
e$B$ke(B API e$B$,I,MW$G$9!#$=$&$$$&e(B API e$B$H$7$F!“J8;zNs$Ne(B “&”
e$B$He(B
“%26” e$B$r<u$1EO$9$b$N$,;H$o$l$F$$$k$H$$$&$N$,8=>u$G$7$g$&!#e(B
e$B$D$^$j!”%(%9%1!<%W:Q$_$N$b$N$rEO$9!”$H$$$&$3$H$G$9!#e(B
e$B%$%s%F%j%8%'%s%H!“$H$$$&$N$r%”%W%j%1!<%7%g%sB&$G%(%9%1!<%W$7e(B
e$B$J$/$F$h$$!"$HFI$_$+$($k$H!“2?$r%(%9%1!<%W$9$Y$-$+$H$$$&$H$3e(B
e$B$m$r$I$3$+$GJd40$7$F$”$2$J$$$H$$$1$^$;$s!#e(B
e$B$?$H$($P!“e(BURI.escape_component e$B$H$$$&$N$r9M$($F!”%3%s%]!<%Me(B
e$B%s%H$H$7$F%(%9%1!<%W$9$k$H$$$&%a%=%C%I$H$9$k$H!"6h@Z$jJ8;z$Ke(B
e$B$J$j$&$kJ8;z$r$<$s$V%(%9%1!<%W$9$k$3$H$K$J$j$^$9!#e(B
(URI e$B$KF~$l$i$l$J$$J8;z$b%(%9%1!<%W$7$J$$$H$$$1$J$$$N$G!"7ke(B
e$B6Ie(B unreserved e$B0J30$r%(%9%1!<%W$9$k$N$,E,@Z$G$7$g$&$,e(B)
e$B$"$k$$$O!"e(BURI.escape_html_form([[k1, v1], [k2, v2], …]) e$B$He(B
e$B$$$&%a%=%C%I$,!"e(Bapplication/x-www-form-urlencoded e$B$K=>$C$Fe(B
(e$B%(%9%1!<%W$7$Fe(B) k1=v1&k2=v2&… e$B$H$$$&7A<0$r@8@.$9$k%a%=%Ce(B
e$B%I$@$H$9$k$H!"e(Bk, v e$B$NCf$G$O!“e(Bquery e$B$K;H$($J$$J8;z$He(B =,
& e$B$re(B
e$B%(%9%1!<%W$9$k$3$H$K$J$j$^$9!#e(B(e$B$”$He(B + e$B$He(B ;
e$B$b$+$Je(B)
URI.escape_component e$B$K$7$F$be(B URI.escape_html_form
e$B$K$7$F$b!“e(B
e$B%a%=%C%IL>$,2?$r%(%9%1!<%W$9$Y$-$+$H$$$&$H$$$&0UL#$r;XDj$7$Fe(B
e$B$$$F!”$I$&$$$&e(B API e$B$K$;$h$3$l$HF1Ey$J;XDj$O$I$3$+$G$7$J$$$He(B
e$B$$$1$J$$$o$1$G$9!#$J$N$G!"$=$&$$$&;XDj$r$I$N$/$i$$4J7i$K$G$-e(B
e$B$k$+$,%$%s%F%j%8%'%s%H$K;W$($ke(B API e$B$N80$G$7$g$&$+!#e(B