29/11 2018 python2编码转换将unicode转换为str 技术技巧 python2 编码转换 评论 def tostr(text): if isinstance(text, unicode): text = text.encode("unicode_escape").decode("string_escape") return text + MORE