运行 python 测试用例的过程中经常遇到下面的错误提示: 'gbk' codec can't encode character '\U0001f6d1' in position 24033: illegal multibyte sequence
# -*- coding:utf-8 -*-
print(v.encode('utf-8'))
print(v.encode('gbk','ignore'))
print(v.encode('utf-8').decode('utf-8'))
print(v.encode('utf-8').decode('utf-8').encode('gbk','ignore').decode('gbk'))