def _load_emoji_data():
    """Parse the new draft format of emoji-data.txt"""
    global _presentation_default_emoji, _presentation_default_text
    global _emoji, _emoji_modifier_base

    if _presentation_default_emoji:
        return

    emoji_sets = {
        "Emoji": set(),
        "Emoji_Presentation": set(),
        "Emoji_Modifier": set(),
        "Emoji_Modifier_Base": set(),
        "Extended_Pictographic": set(),
        "Emoji_Component": set(),
    }

    set_names = "|".join(sorted(emoji_sets.keys()))
    line_re = re.compile(
        r"([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))?\s*;\s*" r"(%s)\s*#.*$" % set_names
    )

    with open_unicode_data_file("emoji-data.txt") as f:
        for line in f:
            line = line.strip()
            if not line or line[0] == "#":
                continue
            m = line_re.match(line)
            if not m:
                raise ValueError('Did not match "%s"' % line)
            start = int(m.group(1), 16)
            end = start if not m.group(2) else int(m.group(2), 16)
            emoji_set = emoji_sets.get(m.group(3))
            emoji_set.update(range(start, end + 1))

    # allow our legacy use of handshake and wrestlers with skin tone modifiers
    emoji_sets["Emoji_Modifier_Base"] |= {0x1F91D, 0x1F93C}

    _presentation_default_emoji = frozenset(emoji_sets["Emoji_Presentation"])
    _presentation_default_text = frozenset(
        emoji_sets["Emoji"] - emoji_sets["Emoji_Presentation"]
    )
    _emoji_modifier_base = frozenset(emoji_sets["Emoji_Modifier_Base"])
    _emoji = frozenset(emoji_sets["Emoji"])

    # we have no real use for the 'Emoji_Regional_Indicator' and
    # 'Emoji_Component' sets, and they're not documented, so ignore them.
    # The regional indicator set is just the 26 regional indicator
    # symbols, and the component set is number sign, asterisk, ASCII digits,
    # the regional indicators, and the skin tone modifiers.