def symbol_encode(input, errors='strict'):
    chars = []
    for (i, c) in enumerate(input):
        try:
            chars.append(encodeTable[ord(c)])
        except __HOLE__:
            if errors == 'replace':
                chars.append(ord('?'))
            else:
                raise UnicodeEncodeError("symbol", input, i, i+1, ERROR_STRING)
    return ("".join(map(chr, chars)), len(input))


### Codec APIs
dataset/ETHPy150Open brendonh/pyth/pyth/encodings/symbol.py/symbol_encode