#!python
# encoding: utf-8

s = "哈哈"
ss = u'哈哈'

print s.decode('utf-8').encode('gbk')
print ss.encode('gbk')

 

黄聪:python控制台无法正常显示中文字符串解决方法

相关文章:

  • 2022-12-23
  • 2022-02-23
  • 2022-12-23
  • 2021-05-16
  • 2021-10-02
  • 2021-11-21
  • 2021-09-06
  • 2021-09-16
猜你喜欢
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2021-10-05
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案