摘要: ```python import cgi s = '&' s += u'哈哈' print type(s) print s r = cgi.escape(s) print type(r) print r r = r.encode('gbk') print type(r) print r # # &哈哈 # # &哈哈 # # &哈哈 ``` 阅读全文
posted @ 2017-02-17 14:14 赵康 阅读(265) 评论(0) 推荐(0) 编辑