def character_set(font):
    if type(font) is str:
        font = ttLib.TTFont(font)
    cmap_table = font["cmap"]


    cmaps = {}
    for table in cmap_table.tables:
        if (table.format, table.platformID, table.platEncID) in [
            (4, 3, 1), (12, 3, 10)]:
            cmaps[table.format] = table.cmap
    if 12 in cmaps:
        cmap = cmaps[12]
    elif 4 in cmaps:
        cmap = cmaps[4]
    else:
        cmap = {}
    # names = {}        
    # for code, name in cmap.items():
        # names[name] = code
        # print "names[%s] = %s" % (name, code)
    f = open('/Users/brucelee/Documents/workspace/doing_custom_fonts/input/NotoSansCJKsc_SimplifiedChinese/cmap','wb')
    # f.write(json.dumps(sorted(frozenset(cmap.keys())))) # python will convert \n to os.linesep
    f.write(json.dumps(cmap)) # python will convert \n to os.linesep
    f.close() # you can omi

    return frozenset(cmap.keys())
This marks the file as saved by setting the `saved` attribute to the
dataset/ETHPy150Open dieface/domywebfont/coverage.py/character_set--crossover with--dataset/ETHPy150Open jeffwidman/flask-uploads/flask_uploads.py/TestingFileStorage.save