2 ini_set('error_reporting', E_ALL);
\r
3 require_once '../MobilePictogramConverter.php';
\r
5 header('Content-Type: text/html; charset=UTF-8');
\r
8 $str = pack('H*', 'EEBD89EF83B3EEB2A1EEB685EEB5A8EEB2A3EEB2A2EEB299EF83B4EF83B5EEB294EEB297EEB5ADEEB29FEEBD8BEF83B6EEB296EEBD8C').'あasdいうえお';
\r
9 $option = MPC_FROM_OPTION_RAW;
\r
11 //$str = 'あf<img localsrc="1">い<img localsrc="2">う<img localsrc="3">え<img localsrc="4">お';
\r
12 //$option = MPC_FROM_OPTION_WEB;
\r
14 //$str = 'あs<img src="../img/e/1.gif" alt="" border="0" />い<img src="../img/e/2.gif" alt="" border="0" />う<img src="../img/e/3.gif" alt="" border="0" />え<img src="../img/e/4.gif" alt="" border="0" />お';
\r
15 //$option = MPC_FROM_OPTION_IMG;
\r
17 $mpc =& MobilePictogramConverter::factory($str, MPC_FROM_EZWEB, MPC_FROM_CHARSET_UTF8, $option);
\r
18 if (is_object($mpc) == false) {
\r
21 $mpc->setImagePath('../img/');
\r
25 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
\r
26 <title>EZweb絵文字からの変換 (UTF-8)</title>
\r
30 /* ユーザーエージェントからの自動変換 */
\r
31 echo 'Auto :'.$mpc->autoConvert().'<br />'."\r\n";
\r
33 echo 'Delete : '.$mpc->Except().'<br />'."\r\n";
\r
34 /* 文字列に含まれている絵文字の数 */
\r
35 echo 'Count : '.$mpc->Count().'<br />'."\r\n";
\r
37 /* モバイル表示用(Web入力コード) */
\r
38 //echo 'EZweb : ' .$mpc->Convert(MPC_TO_EZWEB , MPC_TO_OPTION_WEB).'<br />'."\r\n";
\r
39 //echo 'FOMA : ' .$mpc->Convert(MPC_TO_FOMA , MPC_TO_OPTION_WEB).'<br />'."\r\n";
\r
40 //echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_WEB).'<br />'."\r\n";
\r
42 /* モバイル表示用(バイナリコード) */
\r
43 //echo 'EZweb : ' .$mpc->Convert(MPC_TO_EZWEB , MPC_TO_OPTION_RAW).'<br />'."\r\n";
\r
44 //echo 'FOMA : ' .$mpc->Convert(MPC_TO_FOMA , MPC_TO_OPTION_RAW).'<br />'."\r\n";
\r
45 //echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_RAW).'<br />'."\r\n";
\r
48 //echo 'EZweb : ' .$mpc->Convert(MPC_TO_EZWEB , MPC_TO_OPTION_IMG).'<br />'."\r\n";
\r
49 //echo 'FOMA : ' .$mpc->Convert(MPC_TO_FOMA , MPC_TO_OPTION_IMG).'<br />'."\r\n";
\r
50 //echo 'SoftBank : '.$mpc->Convert(MPC_TO_SOFTBANK, MPC_TO_OPTION_IMG).'<br />'."\r\n";
\r