403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/fontTools/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/fontTools/unicode.py
def _makeunicodes(f):
    lines = iter(f.readlines())
    unicodes = {}
    for line in lines:
        if not line:
            continue
        num, name = line.split(";")[:2]
        if name[0] == "<":
            continue  # "<control>", etc.
        num = int(num, 16)
        unicodes[num] = name
    return unicodes


class _UnicodeCustom(object):
    def __init__(self, f):
        if isinstance(f, str):
            with open(f) as fd:
                codes = _makeunicodes(fd)
        else:
            codes = _makeunicodes(f)
        self.codes = codes

    def __getitem__(self, charCode):
        try:
            return self.codes[charCode]
        except KeyError:
            return "????"


class _UnicodeBuiltin(object):
    def __getitem__(self, charCode):
        try:
            # use unicodedata backport to python2, if available:
            # https://github.com/mikekap/unicodedata2
            import unicodedata2 as unicodedata
        except ImportError:
            import unicodedata
        try:
            return unicodedata.name(chr(charCode))
        except ValueError:
            return "????"


Unicode = _UnicodeBuiltin()


def setUnicodeData(f):
    global Unicode
    Unicode = _UnicodeCustom(f)

Youez - 2016 - github.com/yon3zu
LinuXploit