📅  最后修改于: 2022-03-11 14:45:29.654000             🧑  作者: Mango
if isinstance(unicode_or_str, str):
text = unicode_or_str
decoded = False
else:
text = unicode_or_str.decode(encoding)
decoded = True