in template first line type code as follows:
%# -*- coding: gb2312 -*-
in controller write
response.content_type = 'text/html; charset=gb2312'
感觉到阅读代码的能力增强了,最近的问题都是通过阅读代码,修改代码,揍活代码,优雅改良,解决问题的
reference:
http://snipplr.com/view/22778/python-web-with-bottle/
bottle wsgi server performance compare
http://bottle.paws.de/page/2009-12-19_Comparing_HelloWorld_Performance
%# -*- coding: gb2312 -*-
in controller write
response.content_type = 'text/html; charset=gb2312'
感觉到阅读代码的能力增强了,最近的问题都是通过阅读代码,修改代码,揍活代码,优雅改良,解决问题的
reference:
http://snipplr.com/view/22778/python-web-with-bottle/
bottle wsgi server performance compare
http://bottle.paws.de/page/2009-12-19_Comparing_HelloWorld_Performance

本文分享了通过阅读代码、修改代码并解决实际问题的经验。作者强调了掌握代码的重要性,并提供了具体的代码示例,如设置文件编码格式及响应内容类型。
988

被折叠的 条评论
为什么被折叠?



