def get_encoding(content):
    encodings = chardet.detect(content)
    if 'encoding' in encodings:
        return encodings['encoding']
    else:
        return 'utf8'
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/docutil/commands_util.py/get_encoding/original