close
例1 mb_convert_encoding() 例子
<?php
/* 轉換內部編碼為 SJIS */
$str = mb_convert_encoding($str, "SJIS");
/* 將 EUC-JP 轉換成 UTF-7 */
$str = mb_convert_encoding($str, "UTF-7", "EUC-JP");
/* 從 JIS, eucjp-win, sjis-win 中自動檢測編碼,並轉換 str 到 UCS-2LE */
$str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win");
/* "auto" 擴展成 "ASCII,JIS,UTF-8,EUC-JP,SJIS" */
$str = mb_convert_encoding($str, "EUC-JP", "auto");
全站熱搜