python 字符串GBK解码

来源:互联网 发布:python汉化 编辑:程序博客网 时间:2024/05/26 02:52

有两种方式解码 ,同理可以解UTF-8

  String.String().decode_bytes_to_string(str(value),'GBK'))
    str(value.decode('GBK'))

 

 

String.String().decode_bytes_to_string(str(val),'UTF-8')



if c.find(str("好").encode('gbk'))>-1:


 

 

0 0