Skip to content

Instantly share code, notes, and snippets.

@slywalker
Created December 5, 2010 13:29
Show Gist options
  • Save slywalker/729077 to your computer and use it in GitHub Desktop.
Save slywalker/729077 to your computer and use it in GitHub Desktop.
<?php
require_once 'Emoji4Unicode.php';
$emoji = new Emoji4Unicode;
$html = <<<HTML
<ul>
<li>太陽:&#xFE000;</li>
<li>時計:&#xFE01E;</li>
<li>ハートに矢:&#xFEB12;</li>
<li>ロックオン:&#xFEBA2; - Google独自</li>
<li>存在しないコード:&#x00000;</li>
</ul>
HTML;
header('Content-type: application/xhtml+xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<!DOCTYPE html PUBLIC "-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/2.0) 1.0//EN" "i-xhtml_4ja_10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
<title>Example - Emoji4Unicode</title>
</head>
<body>
<h1>Example - Emoji4Unicode</h1>
<h2>docomo</h2>
<?php echo $emoji->convert($html, 'docomo', 'google');?>
<h2>kddi</h2>
<?php echo $emoji->convert($html, 'kddi', 'google');?>
<h2>softbank</h2>
<?php echo $emoji->convert($html, 'softbank', 'google');?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment