返回信息流我的系统环境是winxp+apache2.2+python2.6
按照网上的:如何在Apache下设置Python(WIN,CGI方法) 配置httpd.conf
然后 http://localhost/py.py 发现不能输出中文,并提示如下:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@www.huoche.la and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--请教大家该怎么解决让它支持中文输出呢?
这是一条镜像帖。来源:北邮人论坛 / www-technology / #10649同步于 2010/8/13
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖
求助,apache+python2.6输出中文问题
killme
2010/8/13镜像同步4 回复
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
确定是中文引起的?看一下apache的error log报什么错
【 在 killme (胆小鬼) 的大作中提到: 】
: 我的系统环境是winxp+apache2.2+python2.6
: 按照网上的:如何在Apache下设置Python(WIN,CGI方法) 配置httpd.conf
: 然后 http://localhost/py.py 发现不能输出中文,并提示如下:
: ...................
确定是中文引起的么?
帮忙呼叫wks~~
【 在 killme (胆小鬼) 的大作中提到: 】
: 我的系统环境是winxp+apache2.2+python2.6
: 按照网上的:如何在Apache下设置Python(WIN,CGI方法) 配置httpd.conf
: 然后 http://localhost/py.py 发现不能输出中文,并提示如下:
: ...................
【 在 xw2423 的大作中提到: 】
: 确定是中文引起的?看一下apache的error log报什么错
: 【 在 killme (胆小鬼) 的大作中提到: 】
: : 我的系统环境是winxp+apache2.2+python2.6
: ...................
解决了!
是中文问题
error.log SyntaxError: Non-ASCII character '\\xb0' in file
原来忘记#coding:gbk 了!