Example #1
0
def _parse_script_metadata():
    global _SCRIPT_METADATA
    data = open(
        path.join(CLDR_DIR, 'common', 'properties',
                  'scriptMetadata.txt')).read()
    parsed_data = unicode_data._parse_semicolon_separated_data(data)
    _SCRIPT_METADATA = {line[0]: tuple(line[1:]) for line in parsed_data}
Example #2
0
def parse_script_metadata():
    global script_metadata
    data = open(
        path.join(CLDR_DIR, "common", "properties",
                  "scriptMetadata.txt")).read()
    parsed_data = unicode_data._parse_semicolon_separated_data(data)
    script_metadata = {line[0]: tuple(line[1:]) for line in parsed_data}
def get_android_emoji():
    """Return additional Android default emojis."""
    android_emoji = set()
    with open(EMOJI_ADDITIONS_FILE) as emoji_additions:
        data = unicode_data._parse_semicolon_separated_data(
            emoji_additions.read())
        for codepoint, prop in data:
            if prop == 'Emoji_Presentation':
                android_emoji.add(int(codepoint, 16))
    return android_emoji
Example #4
0
def get_android_emoji():
    """Return additional Android default emojis."""
    android_emoji = set()
    with open(EMOJI_ADDITIONS_FILE) as emoji_additions:
        data = unicode_data._parse_semicolon_separated_data(
            emoji_additions.read())
        for codepoint, prop in data:
            if prop == 'Emoji_Presentation':
                android_emoji.add(int(codepoint, 16))
    return android_emoji
def parse_script_metadata():
    global script_metadata
    data = open(path.join(
        CLDR_DIR, 'common', 'properties', 'scriptMetadata.txt')).read()
    parsed_data = unicode_data._parse_semicolon_separated_data(data)
    script_metadata = {line[0]:tuple(line[1:]) for line in parsed_data}