2005年12月16日 星期五 08:50
我要解析 xml中有汉字,在xml中 encoding="", 在python中, # -*- coding: -*- 又应该是什么,那位好好给解释一下,关于编码迷茫阿! -- 今天决定明天! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20051216/a2c5be1e/attachment.htm
2005年12月16日 星期五 08:54
在 05-12-16,zhang sw.zhangxy<swzhangxy at gmail.com> 写道: > 我要解析 xml中有汉字,在xml中 encoding="", > 在python中, # -*- coding: -*- 又应该是什么,那位好好给解释一下,关于编码迷茫阿! > 请不要发相同的邮件,这个邮件不是已经回过了嘛! -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit
2005年12月19日 星期一 09:22
#! -*- encoding:utf-8 *- 是指定文件编码方式 import locale def utf8(str,encoding=locale.getdefaultlocale()[1]): tmp = unicode(str,"utf-8") return tmp.encode(encoding) 在 05-12-16,limodou<limodou at gmail.com> 写道: > 在 05-12-16,zhang sw.zhangxy<swzhangxy at gmail.com> 写道: > > 我要解析 xml中有汉字,在xml中 encoding="", > > 在python中, # -*- coding: -*- 又应该是什么,那位好好给解释一下,关于编码迷茫阿! > > > > 请不要发相同的邮件,这个邮件不是已经回过了嘛! > > -- > I like python! > My Blog: http://www.donews.net/limodou > NewEdit Maillist: http://groups.google.com/group/NewEdit > > _______________________________________________ > 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 > >
2005年12月22日 星期四 12:29
测试!~ 一直在关注Python,不过在潜水,最近受不到Phthon列表了。。。 怎么回事?? 在05-12-16,zhang sw.zhangxy <swzhangxy at gmail.com> 写道: > > 我要解析 xml中有汉字,在xml中 encoding="", > 在python中, # -*- coding: -*- 又应该是什么,那位好好给解释一下,关于编码迷茫阿! > > > -- > 今天决定明天! > _______________________________________________ > 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/20051222/e47d23ad/attachment.html
Zeuux © 2025
京ICP备05028076号