web.py中文字符串网页显示乱码的解决

#!/usr/bin/env python  
# encoding: utf-8
import web
urls = (
'/', 'index'
)
class index:
def GET(self):
web.header('Content-Type', 'text/html;charset=UTF-8')
return "<h1>你好!</h1>"
if __name__ == "__main__":
app = web.application(urls, globals())
app.run()

相关文章:

  • 2022-01-12
  • 2021-10-29
  • 2022-12-23
  • 2022-02-10
  • 2021-05-07
  • 2022-12-23
猜你喜欢
  • 2021-05-18
  • 2021-12-17
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案