Skip to content

unicode2gbk

pythonstar edited this page Dec 5, 2016 · 1 revision

功能

将unicode字符串转换为gbk字符串。

参数

  • s:字符串,unicode字符串。

返回值

gbk字符串。

示例

print star.gbk2unicode(sys.argv[1] + star.unicode2gbk(u"我"))

等同于

s.encode('gbk')

Clone this wiki locally