python中,将字符串由utf8转gbk

uni_str = utf8_str.decode('utf-8');

gbk_str = uni_str.encode('gbk');

原文地址:https://www.cnblogs.com/mmix2009/p/3216262.html