def remove_surrogates(s, errors='replace'):
    return s.encode('utf-8', errors).decode('utf-8')
Replace surrogates generated by fsdecode with '?'
dataset/ETHPy150Open jborg/attic/attic/helpers.py/remove_surrogates