[PHP-users 18882]文字変換について質問です
keitaro watanabe
k-w @ msd.biglobe.ne.jp
2003年 11月 12日 (水) 19:56:34 JST
$B$$$D$b$*@$OC$K$J$C$F$*$j$^$9!#EOn4$H?=$7$^$9!#(B
$B$_$J$5$s!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B
$B8=:_!"(BPHP$B$N(Bmb_convert_encoding$B$r;H$$(B
UTF-8$B$N%G!<%?$r(BEUC$B$KJQ49$r9T$C$F$$$k$N$G$9$,!"(B
$B0lIt$NJ8;z$,$I$&$7$F$bJQ49$G$-$^$;$s!#(B
$B0J2<!"%=!<%9$K$J$j$^$9!#(B
$fp = fopen( "data.txt" , "r" );
$string = fgets($fp , 255);
print mb_convert_encoding ( $string , "EUC" ,"UTF-8");
$B$3$N%*!<%W%s$9$k(Bdata.txt$B$NCf?H$,(B
utf-8$B$G!!;3yu!!$, @ _Dj$5$l$F$$$^$9!#(B
$B$3$NFI$_<h$C$?%G!<%?$r!"(Bmb_convert_encoding $B$G(B
EUC$B$KJQ49$7=PNO$r9T$&$H!"yu!!$,J8;z2=$1$r5/$3$7$F$7$^$$$^$9!#(B
$B2a5n$N%a!<%k$r0lDL$j8!:w$7$?$N$G$9$,!"(B
$B8+$D$1$k$3$H$,$G$-$^$;$s$G$7$?!#(B
$B$3$N8=>]$O$I$N$h$&$K$9$l$P2r7h$9$k$N$G$7$g$&$+!)(B
$B$4B8$8$NJ}$,$*$i$l$l$P$*65$($/$@$5$$!#(B
$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B
$B4D6-!'(B
php 4.3.2
mbstring.http_input SJIS
mbstring.http_output SJIS
mbstring.internal_encoding EUC-JP
PHP-users メーリングリストの案内