<?php
/* Convert internal character encoding to SJIS */
$str = mb_convert_encoding($str, "SJIS");
/* Convert EUC_JP to UTF_7 */
$str = mb_convert_encoding($str, "UTF_7", "EUC_JP");
/* Auto detect encoding from JIS, eucjp_win, sjis_win, then convert str to UCS_2LE */
$str = mb_convert_encoding($str, "UCS_2LE", "JIS, eucjp_win, sjis_win");
/* "auto" is expanded to "ASCII,JIS,UTF_8,EUC_JP,SJIS" */
$str = mb_convert_encoding($str, "EUC_JP", "auto");
?> |