开始学习和使用Google App Engine, 并把HelloWorld程序运行起来了.
app.yaml
application: helloworld
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: helloworld.py
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: helloworld.py
helloworld.py(加入了中文测试)
#coding=utf-8
print 'Content-Type: text/plain'
print ''
s = 'Hello, world!中文123'
print unicode(s,"utf-8").encode("gbk")
print 'Content-Type: text/plain'
print ''
s = 'Hello, world!中文123'
print unicode(s,"utf-8").encode("gbk")
显示中文真的如此麻烦吗?