web.py输出中文字符串乱码问题的解决

mac2022-06-30  29

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

#!/usr/bin/env python # encoding: utf-8 import weburls = ('/', '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()

转载于:https://www.cnblogs.com/c-x-a/p/9176396.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)