2006年01月19日 星期四 19:27
我的情况这样 windows 2003 english, 开启utf8编码, Apache default charset: utf8 文件编码utf-8 , html 头meta标记使用utf8 Apache + mod_python + Quixote 请问如何让quixote正常以utf8显示中文?我从浏览器访问,默认不是utf的,要手动选择就能正常显示了. -- Yours, fluke fluke at sfcube.net http://sfcube.net/blog -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060119/f00aa4e8/attachment.html
2006年01月19日 星期四 21:28
??? 在 06-1-19,Fluke<fluke.l at gmail.com> 写道: > 我的情况这样 > windows 2003 english, 开启utf8编码, Apache default charset: utf8 > 文件编码utf-8 , html 头meta标记使用utf8 > Apache + mod_python + Quixote > 请问如何让quixote正常以utf8显示中文?我从浏览器访问,默认不是utf的,要手动选择就能正常显示了. > > -- > Yours, > fluke > fluke at sfcube.net > http://sfcube.net/blog > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > >
2006年01月20日 星期五 00:37
必须得改publish.py文件
找到start_request,改成下面的,我在2.2/2.3上试过.
def start_request(self):
"""Called at the start of each request.
"""
# Modified by Devin -- from iso-8859-1 to utf-8
request = get_request()
request.response = HTTPResponse()
request.response.set_content_type('text/html; charset=utf-8')
self.session_manager.start_request()
再将quixote目录下的__init__.py里的
DEFAULT_CHARSET = 'iso-8859-1' 改成 'utf-8'
这样应该就肯定没有问题了!
我在做的网站也是Quixote.
http://beta.u2m.cn
有兴趣的话上来转转...
Devin
在06-1-19,Fluke <fluke.l at gmail.com> 写道:
>
> 我的情况这样
> windows 2003 english, 开启utf8编码, Apache default charset: utf8
> 文件编码utf-8 , html 头meta标记使用utf8
> Apache + mod_python + Quixote
> 请问如何让quixote正常以utf8显示中文?我从浏览器访问,默认不是utf的,要手动选择就能正常显示了.
>
> --
> Yours,
> fluke
> fluke at sfcube.net
> http://sfcube.net/blog
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060120/a7c407b1/attachment.htm
2006年01月20日 星期五 10:09
use: get_response().set_charset('utf-8')
在 06-1-20,Devin Deng<deng.devin at gmail.com> 写道:
> 必须得改publish.py文件
> 找到start_request,改成下面的,我在2.2/2.3上试过.
> def start_request(self):
> """Called at the start of each request.
> """
> # Modified by Devin -- from iso-8859-1 to utf-8
> request = get_request()
> request.response = HTTPResponse()
> request.response.set_content_type('text/html;
> charset=utf-8')
> self.session_manager.start_request()
> 再将quixote目录下的__init__.py里的
> DEFAULT_CHARSET = 'iso-8859-1' 改成 'utf-8'
>
>
> 这样应该就肯定没有问题了!
>
> 我在做的网站也是Quixote.
> http://beta.u2m.cn
> 有兴趣的话上来转转...
>
>
> Devin
>
>
>
> 在06-1-19,Fluke <fluke.l at gmail.com> 写道:
> >
> >
> > 我的情况这样
> > windows 2003 english, 开启utf8编码, Apache default charset: utf8
> > 文件编码utf-8 , html 头meta标记使用utf8
> > Apache + mod_python + Quixote
> > 请问如何让quixote正常以utf8显示中文?我从浏览器访问,默认不是utf的,要手动选择就能正常显示了.
> >
> > --
> > Yours,
> > fluke
> > fluke at sfcube.net
> > http://sfcube.net/blog
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese at lists.python.cn
> > Subscribe: send subscribe to
> python-chinese-request at lists.python.cn
> > Unsubscribe: send unsubscribe to
> python-chinese-request at lists.python.cn
> > Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
> >
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to
> python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to
> python-chinese-request at lists.python.cn
> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese
>
>
--
my gmail:lihuimail(at)gmail.com
WukooPy:
http://wiki.woodpecker.org.cn/moin/WukooPy
http://groups-beta.google.com/group/python-wukoopy
2006年01月20日 星期五 14:14
> > 我在做的网站也是Quixote. > http://beta.u2m.cn > 有兴趣的话上来转转... > > > 类似"大众点评网"的网站。还有一个问题,模式上似乎都在"借鉴"豆瓣网。不管是网站结构,操作方式,服务模式,都有点类似。呵呵。 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060120/97cebe62/attachment.htm
Zeuux © 2025
京ICP备05028076号