hfg-gmuend / openmoji

Open source emojis for designers, developers and everyone else!
http://openmoji.org
Creative Commons Attribution Share Alike 4.0 International
3.88k stars 216 forks source link

Double red flag #295

Closed ikabod closed 3 years ago

ikabod commented 3 years ago

See openmoji.csv lines

3627: 1F3F3-FE0F-200D-1F7E5,extras-openmoji,flags,red flag,,"socialism, communism",Alexander Müller,2020-05-08

3636: 2691-FE0F-200D-1F7E5,extras-openmoji,flags,red flag,,"socialism, communism",Alexander Müller,2020-05-08

carlinmack commented 3 years ago

Hmm yes all the flags in extras are doubled, thanks for "flagging" this :P

ikabod commented 3 years ago

Please help me understand.

I downloaded the svg color archive and used the mentioned csv file to rename them with php to human readable file names.

I can not see that other flags are doubled too. My rename script complains only the red flag as "file already exists".

carlinmack commented 3 years ago

Ah I see, I'm referring to this https://github.com/hfg-gmuend/openmoji/blob/master/data/openmoji.csv#L3627-L3643

carlinmack commented 3 years ago

oh never mind, I see the problem now:

3636: 2691-FE0F-200D-1F7E5,extras-openmoji,flags,red flag,,"socialism, communism",Alexander Müller,2020-05-08

should be

3636: 2691-FE0F-200D-1F7E5,extras-openmoji,flags,deep red flag,,"socialism, communism",Alexander Müller,2020-05-08

ikabod commented 3 years ago

Thanks for your response.

Even the red flag is not the same as the deep red flag, I created a script to detect identical files and found 107 of them:

flags | country-flag | flag: Spain [1F1EA-1F1F8] flags | country-flag | flag: Ceuta & Melilla [1F1EA-1F1E6]

flags | country-flag | flag: France [1F1EB-1F1F7] flags | country-flag | flag: Clipperton Island [1F1E8-1F1F5]

flags | country-flag | flag: Heard & McDonald Islands [1F1ED-1F1F2] flags | country-flag | flag: Australia [1F1E6-1F1FA]

flags | country-flag | flag: British Indian Ocean Territory [1F1EE-1F1F4] flags | country-flag | flag: Diego Garcia [1F1E9-1F1EC]

flags | country-flag | flag: Monaco [1F1F2-1F1E8] flags | country-flag | flag: Indonesia [1F1EE-1F1E9]

flags | country-flag | flag: St. Martin [1F1F2-1F1EB] flags | country-flag | flag: France [1F1EB-1F1F7]

flags | country-flag | flag: Svalbard & Jan Mayen [1F1F8-1F1EF] flags | country-flag | flag: Norway [1F1F3-1F1F4]

flags | country-flag | flag: Chad [1F1F9-1F1E9] flags | country-flag | flag: Romania [1F1F7-1F1F4]

people-body | family | family [1F46A] people-body | family | family: man, woman, boy [1F468-200D-1F469-200D-1F466]

people-body | person-role | person wearing turban: light skin tone [1F473-1F3FB] people-body | person-role | woman wearing turban: light skin tone [1F473-1F3FB-200D-2640-FE0F]

people-body | person-role | person wearing turban: medium-light skin tone [1F473-1F3FC] people-body | person-role | woman wearing turban: medium-light skin tone [1F473-1F3FC-200D-2640-FE0F]

people-body | person-role | person wearing turban: medium skin tone [1F473-1F3FD] people-body | person-role | woman wearing turban: medium skin tone [1F473-1F3FD-200D-2640-FE0F]

people-body | person-role | person wearing turban: medium-dark skin tone [1F473-1F3FE] people-body | person-role | woman wearing turban: medium-dark skin tone [1F473-1F3FE-200D-2640-FE0F]

people-body | person-role | person wearing turban: dark skin tone [1F473-1F3FF] people-body | person-role | woman wearing turban: dark skin tone [1F473-1F3FF-200D-2640-FE0F]

people-body | person-role | person wearing turban [1F473] people-body | person-role | woman wearing turban [1F473-200D-2640-FE0F]

people-body | family | kiss [1F48F] people-body | family | kiss: woman, man [1F469-200D-2764-FE0F-200D-1F48B-200D-1F468]

symbols | geometric | brown square [1F7EB] component | skin-tone | medium-dark skin tone [1F3FE]

people-body | person-activity | person standing: light skin tone [1F9CD-1F3FB] people-body | person-activity | man standing: light skin tone [1F9CD-1F3FB-200D-2642-FE0F]

people-body | person-activity | person standing: medium-light skin tone [1F9CD-1F3FC] people-body | person-activity | man standing: medium-light skin tone [1F9CD-1F3FC-200D-2642-FE0F]

people-body | person-activity | person standing: medium skin tone [1F9CD-1F3FD] people-body | person-activity | man standing: medium skin tone [1F9CD-1F3FD-200D-2642-FE0F]

people-body | person-activity | person standing: medium-dark skin tone [1F9CD-1F3FE] people-body | person-activity | man standing: medium-dark skin tone [1F9CD-1F3FE-200D-2642-FE0F]

people-body | person-activity | person standing: dark skin tone [1F9CD-1F3FF] people-body | person-activity | man standing: dark skin tone [1F9CD-1F3FF-200D-2642-FE0F]

people-body | person-activity | person standing [1F9CD] people-body | person-activity | man standing [1F9CD-200D-2642-FE0F]

people-body | person-activity | person kneeling: light skin tone [1F9CE-1F3FB] people-body | person-activity | man kneeling: light skin tone [1F9CE-1F3FB-200D-2642-FE0F]

people-body | person-activity | person kneeling: medium-light skin tone [1F9CE-1F3FC] people-body | person-activity | man kneeling: medium-light skin tone [1F9CE-1F3FC-200D-2642-FE0F]

people-body | person-activity | person kneeling: medium skin tone [1F9CE-1F3FD] people-body | person-activity | man kneeling: medium skin tone [1F9CE-1F3FD-200D-2642-FE0F]

people-body | person-activity | person kneeling: medium-dark skin tone [1F9CE-1F3FE] people-body | person-activity | man kneeling: medium-dark skin tone [1F9CE-1F3FE-200D-2642-FE0F]

people-body | person-activity | person kneeling: dark skin tone [1F9CE-1F3FF] people-body | person-activity | man kneeling: dark skin tone [1F9CE-1F3FF-200D-2642-FE0F]

people-body | person-activity | person kneeling [1F9CE] people-body | person-activity | man kneeling [1F9CE-200D-2642-FE0F]

people-body | person-role | farmer: light skin tone [1F9D1-1F3FB-200D-1F33E] people-body | person-role | man farmer: light skin tone [1F468-1F3FB-200D-1F33E]

people-body | person-role | cook: light skin tone [1F9D1-1F3FB-200D-1F373] people-body | person-role | man cook: light skin tone [1F468-1F3FB-200D-1F373]

people-body | person-role | student: light skin tone [1F9D1-1F3FB-200D-1F393] people-body | person-role | man student: light skin tone [1F468-1F3FB-200D-1F393]

people-body | person-role | artist: light skin tone [1F9D1-1F3FB-200D-1F3A8] people-body | person-role | man artist: light skin tone [1F468-1F3FB-200D-1F3A8]

people-body | person-role | factory worker: light skin tone [1F9D1-1F3FB-200D-1F3ED] people-body | person-role | man factory worker: light skin tone [1F468-1F3FB-200D-1F3ED]

people-body | person-role | mechanic: light skin tone [1F9D1-1F3FB-200D-1F527] people-body | person-role | man mechanic: light skin tone [1F468-1F3FB-200D-1F527]

people-body | person-role | astronaut: light skin tone [1F9D1-1F3FB-200D-1F680] people-body | person-role | man astronaut: light skin tone [1F468-1F3FB-200D-1F680]

people-body | person-role | firefighter: light skin tone [1F9D1-1F3FB-200D-1F692] people-body | person-role | man firefighter: light skin tone [1F468-1F3FB-200D-1F692]

people-body | person-activity | person with white cane: light skin tone [1F9D1-1F3FB-200D-1F9AF] people-body | person-activity | man with white cane: light skin tone [1F468-1F3FB-200D-1F9AF]

people-body | person | person: light skin tone, bald [1F9D1-1F3FB-200D-1F9B2] people-body | person | man: light skin tone, bald [1F468-1F3FB-200D-1F9B2]

people-body | person-activity | person in motorized wheelchair: light skin tone [1F9D1-1F3FB-200D-1F9BC] people-body | person-activity | man in motorized wheelchair: light skin tone [1F468-1F3FB-200D-1F9BC]

people-body | person-activity | person in manual wheelchair: light skin tone [1F9D1-1F3FB-200D-1F9BD] people-body | person-activity | man in manual wheelchair: light skin tone [1F468-1F3FB-200D-1F9BD]

people-body | person-role | pilot: light skin tone [1F9D1-1F3FB-200D-2708-FE0F] people-body | person-role | man pilot: light skin tone [1F468-1F3FB-200D-2708-FE0F]

people-body | person-role | farmer: medium-light skin tone [1F9D1-1F3FC-200D-1F33E] people-body | person-role | man farmer: medium-light skin tone [1F468-1F3FC-200D-1F33E]

people-body | person-role | cook: medium-light skin tone [1F9D1-1F3FC-200D-1F373] people-body | person-role | man cook: medium-light skin tone [1F468-1F3FC-200D-1F373]

people-body | person-role | student: medium-light skin tone [1F9D1-1F3FC-200D-1F393] people-body | person-role | man student: medium-light skin tone [1F468-1F3FC-200D-1F393]

people-body | person-role | artist: medium-light skin tone [1F9D1-1F3FC-200D-1F3A8] people-body | person-role | man artist: medium-light skin tone [1F468-1F3FC-200D-1F3A8]

people-body | person-role | factory worker: medium-light skin tone [1F9D1-1F3FC-200D-1F3ED] people-body | person-role | man factory worker: medium-light skin tone [1F468-1F3FC-200D-1F3ED]

people-body | person-role | mechanic: medium-light skin tone [1F9D1-1F3FC-200D-1F527] people-body | person-role | man mechanic: medium-light skin tone [1F468-1F3FC-200D-1F527]

people-body | person-role | astronaut: medium-light skin tone [1F9D1-1F3FC-200D-1F680] people-body | person-role | man astronaut: medium-light skin tone [1F468-1F3FC-200D-1F680]

people-body | person-role | firefighter: medium-light skin tone [1F9D1-1F3FC-200D-1F692] people-body | person-role | man firefighter: medium-light skin tone [1F468-1F3FC-200D-1F692]

people-body | person-activity | person with white cane: medium-light skin tone [1F9D1-1F3FC-200D-1F9AF] people-body | person-activity | man with white cane: medium-light skin tone [1F468-1F3FC-200D-1F9AF]

people-body | person | person: medium-light skin tone, bald [1F9D1-1F3FC-200D-1F9B2] people-body | person | man: medium-light skin tone, bald [1F468-1F3FC-200D-1F9B2]

people-body | person-activity | person in motorized wheelchair: medium-light skin tone [1F9D1-1F3FC-200D-1F9BC] people-body | person-activity | man in motorized wheelchair: medium-light skin tone [1F468-1F3FC-200D-1F9BC]

people-body | person-activity | person in manual wheelchair: medium-light skin tone [1F9D1-1F3FC-200D-1F9BD] people-body | person-activity | man in manual wheelchair: medium-light skin tone [1F468-1F3FC-200D-1F9BD]

people-body | person-role | pilot: medium-light skin tone [1F9D1-1F3FC-200D-2708-FE0F] people-body | person-role | man pilot: medium-light skin tone [1F468-1F3FC-200D-2708-FE0F]

people-body | person-role | farmer: medium skin tone [1F9D1-1F3FD-200D-1F33E] people-body | person-role | man farmer: medium skin tone [1F468-1F3FD-200D-1F33E]

people-body | person-role | cook: medium skin tone [1F9D1-1F3FD-200D-1F373] people-body | person-role | man cook: medium skin tone [1F468-1F3FD-200D-1F373]

people-body | person-role | student: medium skin tone [1F9D1-1F3FD-200D-1F393] people-body | person-role | man student: medium skin tone [1F468-1F3FD-200D-1F393]

people-body | person-role | artist: medium skin tone [1F9D1-1F3FD-200D-1F3A8] people-body | person-role | man artist: medium skin tone [1F468-1F3FD-200D-1F3A8]

people-body | person-role | factory worker: medium skin tone [1F9D1-1F3FD-200D-1F3ED] people-body | person-role | man factory worker: medium skin tone [1F468-1F3FD-200D-1F3ED]

people-body | person-role | mechanic: medium skin tone [1F9D1-1F3FD-200D-1F527] people-body | person-role | man mechanic: medium skin tone [1F468-1F3FD-200D-1F527]

people-body | person-role | astronaut: medium skin tone [1F9D1-1F3FD-200D-1F680] people-body | person-role | man astronaut: medium skin tone [1F468-1F3FD-200D-1F680]

people-body | person-role | firefighter: medium skin tone [1F9D1-1F3FD-200D-1F692] people-body | person-role | man firefighter: medium skin tone [1F468-1F3FD-200D-1F692]

people-body | person-activity | person with white cane: medium skin tone [1F9D1-1F3FD-200D-1F9AF] people-body | person-activity | man with white cane: medium skin tone [1F468-1F3FD-200D-1F9AF]

people-body | person | person: medium skin tone, bald [1F9D1-1F3FD-200D-1F9B2] people-body | person | man: medium skin tone, bald [1F468-1F3FD-200D-1F9B2]

people-body | person-activity | person in motorized wheelchair: medium skin tone [1F9D1-1F3FD-200D-1F9BC] people-body | person-activity | man in motorized wheelchair: medium skin tone [1F468-1F3FD-200D-1F9BC]

people-body | person-activity | person in manual wheelchair: medium skin tone [1F9D1-1F3FD-200D-1F9BD] people-body | person-activity | man in manual wheelchair: medium skin tone [1F468-1F3FD-200D-1F9BD]

people-body | person-role | pilot: medium skin tone [1F9D1-1F3FD-200D-2708-FE0F] people-body | person-role | man pilot: medium skin tone [1F468-1F3FD-200D-2708-FE0F]

people-body | person-role | farmer: medium-dark skin tone [1F9D1-1F3FE-200D-1F33E] people-body | person-role | man farmer: medium-dark skin tone [1F468-1F3FE-200D-1F33E]

people-body | person-role | cook: medium-dark skin tone [1F9D1-1F3FE-200D-1F373] people-body | person-role | man cook: medium-dark skin tone [1F468-1F3FE-200D-1F373]

people-body | person-role | student: medium-dark skin tone [1F9D1-1F3FE-200D-1F393] people-body | person-role | man student: medium-dark skin tone [1F468-1F3FE-200D-1F393]

people-body | person-role | artist: medium-dark skin tone [1F9D1-1F3FE-200D-1F3A8] people-body | person-role | man artist: medium-dark skin tone [1F468-1F3FE-200D-1F3A8]

people-body | person-role | factory worker: medium-dark skin tone [1F9D1-1F3FE-200D-1F3ED] people-body | person-role | man factory worker: medium-dark skin tone [1F468-1F3FE-200D-1F3ED]

people-body | person-role | mechanic: medium-dark skin tone [1F9D1-1F3FE-200D-1F527] people-body | person-role | man mechanic: medium-dark skin tone [1F468-1F3FE-200D-1F527]

people-body | person-role | astronaut: medium-dark skin tone [1F9D1-1F3FE-200D-1F680] people-body | person-role | man astronaut: medium-dark skin tone [1F468-1F3FE-200D-1F680]

people-body | person-role | firefighter: medium-dark skin tone [1F9D1-1F3FE-200D-1F692] people-body | person-role | man firefighter: medium-dark skin tone [1F468-1F3FE-200D-1F692]

people-body | person-activity | person with white cane: medium-dark skin tone [1F9D1-1F3FE-200D-1F9AF] people-body | person-activity | man with white cane: medium-dark skin tone [1F468-1F3FE-200D-1F9AF]

people-body | person | person: medium-dark skin tone, bald [1F9D1-1F3FE-200D-1F9B2] people-body | person | man: medium-dark skin tone, bald [1F468-1F3FE-200D-1F9B2]

people-body | person-activity | person in motorized wheelchair: medium-dark skin tone [1F9D1-1F3FE-200D-1F9BC] people-body | person-activity | man in motorized wheelchair: medium-dark skin tone [1F468-1F3FE-200D-1F9BC]

people-body | person-activity | person in manual wheelchair: medium-dark skin tone [1F9D1-1F3FE-200D-1F9BD] people-body | person-activity | man in manual wheelchair: medium-dark skin tone [1F468-1F3FE-200D-1F9BD]

people-body | person-role | pilot: medium-dark skin tone [1F9D1-1F3FE-200D-2708-FE0F] people-body | person-role | man pilot: medium-dark skin tone [1F468-1F3FE-200D-2708-FE0F]

people-body | person-role | farmer: dark skin tone [1F9D1-1F3FF-200D-1F33E] people-body | person-role | man farmer: dark skin tone [1F468-1F3FF-200D-1F33E]

people-body | person-role | cook: dark skin tone [1F9D1-1F3FF-200D-1F373] people-body | person-role | man cook: dark skin tone [1F468-1F3FF-200D-1F373]

people-body | person-role | student: dark skin tone [1F9D1-1F3FF-200D-1F393] people-body | person-role | man student: dark skin tone [1F468-1F3FF-200D-1F393]

people-body | person-role | artist: dark skin tone [1F9D1-1F3FF-200D-1F3A8] people-body | person-role | man artist: dark skin tone [1F468-1F3FF-200D-1F3A8]

people-body | person-role | factory worker: dark skin tone [1F9D1-1F3FF-200D-1F3ED] people-body | person-role | man factory worker: dark skin tone [1F468-1F3FF-200D-1F3ED]

people-body | person-role | mechanic: dark skin tone [1F9D1-1F3FF-200D-1F527] people-body | person-role | man mechanic: dark skin tone [1F468-1F3FF-200D-1F527]

people-body | person-role | astronaut: dark skin tone [1F9D1-1F3FF-200D-1F680] people-body | person-role | man astronaut: dark skin tone [1F468-1F3FF-200D-1F680]

people-body | person-role | firefighter: dark skin tone [1F9D1-1F3FF-200D-1F692] people-body | person-role | man firefighter: dark skin tone [1F468-1F3FF-200D-1F692]

people-body | person-activity | person with white cane: dark skin tone [1F9D1-1F3FF-200D-1F9AF] people-body | person-activity | man with white cane: dark skin tone [1F468-1F3FF-200D-1F9AF]

people-body | person | person: dark skin tone, bald [1F9D1-1F3FF-200D-1F9B2] people-body | person | man: dark skin tone, bald [1F468-1F3FF-200D-1F9B2]

people-body | person-activity | person in motorized wheelchair: dark skin tone [1F9D1-1F3FF-200D-1F9BC] people-body | person-activity | man in motorized wheelchair: dark skin tone [1F468-1F3FF-200D-1F9BC]

people-body | person-activity | person in manual wheelchair: dark skin tone [1F9D1-1F3FF-200D-1F9BD] people-body | person-activity | man in manual wheelchair: dark skin tone [1F468-1F3FF-200D-1F9BD]

people-body | person-role | pilot: dark skin tone [1F9D1-1F3FF-200D-2708-FE0F] people-body | person-role | man pilot: dark skin tone [1F468-1F3FF-200D-2708-FE0F]

people-body | person-role | farmer [1F9D1-200D-1F33E] people-body | person-role | man farmer [1F468-200D-1F33E]

people-body | person-role | cook [1F9D1-200D-1F373] people-body | person-role | man cook [1F468-200D-1F373]

people-body | person-role | student [1F9D1-200D-1F393] people-body | person-role | man student [1F468-200D-1F393]

people-body | person-role | artist [1F9D1-200D-1F3A8] people-body | person-role | man artist [1F468-200D-1F3A8]

people-body | person-role | factory worker [1F9D1-200D-1F3ED] people-body | person-role | man factory worker [1F468-200D-1F3ED]

people-body | person-role | mechanic [1F9D1-200D-1F527] people-body | person-role | man mechanic [1F468-200D-1F527]

people-body | person-role | astronaut [1F9D1-200D-1F680] people-body | person-role | man astronaut [1F468-200D-1F680]

people-body | person-role | firefighter [1F9D1-200D-1F692] people-body | person-role | man firefighter [1F468-200D-1F692]

people-body | person-activity | person with white cane [1F9D1-200D-1F9AF] people-body | person-activity | man with white cane [1F468-200D-1F9AF]

people-body | person | person: bald [1F9D1-200D-1F9B2] people-body | person | man: bald [1F468-200D-1F9B2]

people-body | person-activity | person in motorized wheelchair [1F9D1-200D-1F9BC] people-body | person-activity | man in motorized wheelchair [1F468-200D-1F9BC]

people-body | person-activity | person in manual wheelchair [1F9D1-200D-1F9BD] people-body | person-activity | man in manual wheelchair [1F468-200D-1F9BD]

people-body | person-role | pilot [1F9D1-200D-2708-FE0F] people-body | person-role | man pilot [1F468-200D-2708-FE0F]

Identical files found: 107

Here is the script I wrote to detect the files:

<?php

// detect identical svg files in the current folder
// make sure the file 'openmoji.json' is present in the current folder

// call the function
detectIdenticalIcons();

function detectIdenticalIcons() : void
{

    // init vars
    $icons = array(); $identical = 0;

    // source file with the icon data
    $sourceFile = __DIR__ . '/openmoji.json';

    // file missing?
    if ( ! file_exists($sourceFile)) {

        // output an error
        echo 'source file not found in the current folder: ' . $sourceFile;

        // nothing to do
        return;

    }

    // get the json data
    $iconData = (object) json_decode(file_get_contents($sourceFile));

    // get all icon files
    $iconFiles = glob(__DIR__ . '/*.svg');

    // no files found?
    if (count($iconFiles) === 0) {

        // output an error
        echo 'no svg files found in the current folder';

        // nothing to do
        return;

    }

    // loop through the files
    foreach ($iconFiles as $iconFile) {

        // get the md5 hash 
        $md5 = md5_file($iconFile);

        // try to find the hash in the icons array
        if (array_key_exists($md5, $icons)) {

            // increase counter
            ++$identical;

            // get the data of the icon
            $icon1 = getIconFilename($iconFile, $iconData);

            // get the data of the identical icon
            $icon2 = getIconFilename($icons[$md5], $iconData);

            // output the data
            echo $icon1 . '<br>' . $icon2 . '<br><br>';

        }

        // add the file to the array
        $icons[$md5] = $iconFile;

    }

    // output the result
    echo 'Identical files found: <b>' . $identical . '</b>';

}

function getIconFilename(string $file, object $iconData) : string
{

    // init vars
    $result = ''; $icon = null;

    // get the hex code from the filename
    $hexCode = str_replace('.svg', '', basename($file));

    // try to find the icon in the icon data
    foreach ($iconData as $data) {

        // hex code identical?
        if ($data->hexcode === $hexCode) {

            // icon found
            $icon = $data;

            // leave the loop
            break;

        }

    }

    // icon found?
    if ($icon !== null) {

        // read the group
        $group = $icon->group;

        // read the sub groups
        $subGroups = $icon->subgroups;

        // read the icon name
        $iconName = $icon->annotation;

        // put the result together
        $result = $group . ' | ' .  $subGroups . ' | ' . $iconName . ' [' . $hexCode . ']';

    } else {

        // output an error
        echo 'no icon found in json file for hex code <b>: ' . $hexCode . '</b><br>';

    }

    // return the result
    return $result;

}
carlinmack commented 3 years ago

Thanks for this 🙏 @b-g thoughts? I think some of these are sort of intentionally like this but would be good to evaluate (as men as default is a bit faux pas)

Edit: Does seem we can't do much about some of these

image

b-g commented 3 years ago

Currently don't have time to look into it all details but the first ones e.g.

flags | country-flag | flag: Spain [1F1EA-1F1F8] flags | country-flag | flag: Ceuta & Melilla [1F1EA-1F1E6]

are correct. The flag of Spain and the flag of Ceuta & Melilla are identical.

The flag for Ceuta, Melilla, which may show as the letters EA on some platforms. Uses the same flag as Spain.

see https://emojipedia.org/flag-ceuta-melilla/

So I would vote to close this issue as in the past people reported very quickly if a flag was wrong. As there wasn't a big out cry in the past ... I think it is safe to assume that the 107 doubles are (mostly) fine.