echo " DONE\n"; # # extra non-standard CPs # echo "Adding our own extra emoji: "; foreach ($extra_emoji as $cps => $short_name) { $img_key = StrToLower($cps); if ($out_unis[$img_key]) { continue; } $short_names = array($short_name); echo '.'; if (substr($short_name, 0, 5) == 'flag-') { $out[] = simple_row($img_key, $short_names, array('unified' => $cps, 'name' => "REGIONAL INDICATOR SYMBOL LETTERS " . StrToUpper(substr($short_name, 5)))); } else { $out[] = build_character_data($img_key, $short_names); } } echo "OK\n"; function build_character_data($img_key, $short_names) { global $text; $uni = StrToUpper($img_key); $line = shell_exec("grep -e ^{$uni}\\; UnicodeData.txt"); list($junk, $name) = explode(';', $line); return simple_row($img_key, $short_names, array('name' => $name, 'unified' => $uni)); } function simple_row($img_key, $shorts, $props) { $vars = $GLOBALS['catalog_vars'][$img_key]; if (!is_array($vars)) {
$img_key = StrToLower(encode_points($row['unicode'])); $shorts = $catalog_names[$img_key]; $out[] = simple_row($img_key, $shorts, array('name' => $row['char_name']['title'], 'unified' => encode_points($row['unicode']), 'docomo' => encode_points($row['docomo']['unicode']), 'au' => encode_points($row['au']['unicode']), 'softbank' => encode_points($row['softbank']['unicode']), 'google' => encode_points($row['google']['unicode']))); $out_unis[$img_key] = 1; } # # were there any codepoints we have an image for, but no data for? # echo "Finding extra emoji from UCD: "; foreach ($catalog_names as $uid => $names) { if ($uid == '_') { continue; } if (!$out_unis[$uid]) { echo '.'; $out[] = build_character_data($uid, $names); } } echo " DONE\n"; function build_character_data($img_key, $short_names) { global $text; $uni = StrToUpper($img_key); $line = shell_exec("grep -e ^{$uni}\\; UnicodeData.txt"); list($junk, $name) = explode(';', $line); return simple_row($img_key, $short_names, array('name' => $name, 'unified' => $uni)); } function simple_row($img_key, $shorts, $props) { $vars = $GLOBALS['catalog_vars'][$img_key]; if (!is_array($vars)) {