Chinaunix首页 | 论坛 | 博客
  • 博客访问: 294008
  • 博文数量: 47
  • 博客积分: 1411
  • 博客等级: 上尉
  • 技术积分: 500
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-23 09:10
文章分类

全部博文(47)

文章存档

2009年(3)

2008年(4)

2007年(14)

2006年(26)

我的朋友

分类: 系统运维

2009-08-29 18:13:17

Google App Engine Request Handler所返回的request object实际上是继承自WebOb。所以在post处理表单的时候,最好注意编码。否则在默认编码开来非法的字符会被过滤。

class handler(webapp.RequestHandler):
..
    def post(self):
        ....
        self.request.charset = 'utf8'
        self.request.get('request_name')...

另外GAE利用logging.xxx()记录LOG到DebuggingConsole的时候,需要将字符encode成ascii byte code。貌似是个BUG
阅读(2066) | 评论(0) | 转发(0) |
0

上一篇:Android Recovery模式

下一篇:没有了

给主人留下些什么吧!~~