在文件开始加上#coding=utf-8

2009/1/22 网页中有汉字,就会产生错误,不知是啥原因 <[email protected]>

>
> this code right in local development environment, but error on update
> to server.
>
> import wsgiref.handlers
> from google.appengine.ext import webapp
>
> class MainPage(webapp.RequestHandler):
>  def get(self):
>    self.response.headers['Content-Type'] = 'text/html; charset=utf-8'
>    self.response.out.write('<html><body><p>Hello, have no thing,有了汉字就不
> 灵了?</p></body></html>')
>
> def main():
>  application = webapp.WSGIApplication(
>                                        [('/', MainPage)],
>                                       debug=True)
>  wsgiref.handlers.CGIHandler().run(application)
>
> if __name__ == "__main__":
>  main()
>
>
>
> Error: Server Error
>
> The server encountered an error and could not complete your request.
> If the problem persists, please report your problem and mention this
> error message and the query that caused it.
>
>
>
> >
>


-- 
Stay hungry,Stay foolish.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to