RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
创新互联Python教程:pythonweb.py乱码怎么解决?

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 "

你好!

" if __name__ == "__main__":     app = web.application(urls, globals())     app.run()

网站标题:创新互联Python教程:pythonweb.py乱码怎么解决?
网页地址:http://www.jxjierui.cn/article/dhdeshe.html