1
私は、PHPまたはJS関数でUnicode絵文字を表示しようとしていますが、その方法を見つけることができません。 VimはUnicode絵文字をうまく表示せず、文字を変更して奇妙なことをするためにペーストすることはできません。ユニコード絵文字を表示する機能
私はUnicodeコード(U + 1F600のようなもの)を使用して増分を行うことができると考えましたが、誰かがこれを行う方法を説明することができます。
編集:私の悪い英語
編集2のためのいくつかの英語、申し訳ありませんTIL:あなたはそれを使用したい場合、私は私の囲炉裏でこの関数を作っ 、私のゲストも! PHPの他のバージョンでは
<?php
// Function used to get a list of emojis (Unicode)
// She takes ranges of unicode decimal
// Find hexadecimal here : http://apps.timwhitlock.info/emoji/tables/unicode
// Convert in decimal here : http://www.binaryhexconverter.com/hex-to-decimal-converter
// Already organised for my taste but fully customisable
// Use larger ranges like 128512 - 130000 to see your Unicode Browser compatibilty
//
// @Mobidi
function myEmojis($emojiRanges) {
$_result = array();
foreach ($emojiRanges as $start => $end)
{
$current = $start;
while ($current != $end) {
$_result['Emoji n°'.$current.''] = mb_convert_encoding(pack("N*", $current), "UTF-8", "UTF-32BE");
$current ++;
}
}
return $_result;
}
//Key = Start, Value = End.
$emojiRangesCustom = array(
'128512' => '128590',
'129296' => '129310',
'129312' => '129319',
'127744' => '128511',
'128640' => '128705',
'129296' => '129310',
'129312' => '129319',
'129360' => '129374',
'129408' => '129425'
);
$emojiMerge = myEmojis($emojiRangesCustom);
?>
<div style="font-size:24px;text-align:justify">
<?php
//While listing everything ! See you next time
foreach($emojiMerge as $keys => $emoji) {
echo '<a href="#" title="'.$keys.'">'.$emoji.'</a> ';
}
?>
</div>
おかげで多くを生成しますgithubのにダウンロードする必要があり、プロジェクトに含める 、私はあなたの最初のリンクで多くの情報を見つけました。 – Mobidi
父、私は機能を作った、彼女は良い見せてください教えてください! – Mobidi
いいですね。 –