Wednesday, September 29, 2010

php big utf8轉換

在某些機器上採big5 ,
從php送進去的utf8需要轉換成big5

big5 轉 utf-8
PHP 程式碼:
$str=iconv("big5","UTF-8",$str);

utf-8 轉 big5
PHP 程式碼:
$str=iconv("UTF-8","big5",$str);

參考來源:

"big5 轉 utf-8 PHP 程式碼: $str=iconv("big5","UTF-8",$str); utf-8 轉 big5 PHP 程式碼: $str=iconv("UTF-8","big5",$str);"
- php big5跟utf-8互轉的指令 (在「Google 網頁註解」中檢視)

No comments: