2007年09月01日 星期六 04:35
²Ëµ¥£ºÎĵµ->¸Ä±ä±àÂ룬ÉèÖúóÓÖ»á»Øµ½È±Ê¡£¬²»ÖªµÀÓÐûÓÐÉèÖóɹ¦ µÚ¶þ¸öÊDZàÂëÎÊÌ⣬ÔÚunlipadÔËÐÐÊÇ > "C:\Python24\pythonw.exe" -u "C:\tt.py" Traceback (most recent call last): File "C:\tt.py", line 4, in ? print u"哈哈" UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) ¶øÔÚcmdÏ C:\Python24>python -u C:\tt.py ¹þ¹þ 111 ´úÂëÊÇ #coding=utf-8 print u"¹þ¹þ" print 111 лл vsmb 2007-09-01 -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070901/561c0961/attachment.html
2007年09月01日 星期六 08:39
On 9/1/07, vsmb <vsmb在21cn.com> wrote: > > > ²Ëµ¥£ºÎĵµ->¸Ä±ä±àÂ룬ÉèÖúóÓÖ»á»Øµ½È±Ê¡£¬²»ÖªµÀÓÐûÓÐÉèÖóɹ¦ Õâ¸öÉèÖÃÊÇÔÚÄãн¨Îļþʱ²ÅÉúЧµÄ£¬¶ÔÓÚÒ»¸ö´ò¿ªµÄÎļþÊDz»Æð×÷Óõġ£ > µÚ¶þ¸öÊDZàÂëÎÊÌ⣬ÔÚunlipadÔËÐÐÊÇ > > "C:\Python24\pythonw.exe" -u "C:\tt.py" > Traceback (most recent call last): > File "C:\tt.py", line 4, in ? > print u"哈哈" > UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: > ordinal not in range(128) > > > ¶øÔÚcmdÏ > > C:\Python24>python -u C:\tt.py > ¹þ¹þ > 111 > > > ´úÂëÊÇ > #coding=utf-8 > > print u"¹þ¹þ" > > print 111 > > ÒòΪulipadʹÓÃÖض¨ÏòÀ´´¦Àí£¬ÕâÊǵײãµÄÒ»¸öÎÊÌ⣬ÎÒÄ¿Ç°²»ÖªµÀÈçºÎ½â¾ö¡£ÎÒÊÇʹÓÃwx.Execute()À´´¦ÀíµÄ£¬µÀÀíÊÇÒ»ÑùµÄ¡£ -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月01日 星期六 11:42
ÄÇÔÚulipadÏÂÈçºÎÊä³öÖÐÎÄ£¿pydevÊÇ¿ÉÒԵġ£Èç¹ûulipad¿ÉÒÔ¾ÍÌ«ºÃÁË£¬ËٶȿìÄÇô¶à¡£ vsmb 2007-09-01 ·¢¼þÈË£º limodou ·¢ËÍʱ¼ä£º 2007-09-01 08:46:38 ÊÕ¼þÈË£º python-chinese在lists.python.cn ³ËÍ£º Ö÷Ì⣺ Re: [python-chinese]·¢¾õulipad²»´í£¬µ«ËƺõÓÐЩÎÊÌâ On 9/1/07, vsmb <vsmb在21cn.com > wrote: > > > ²Ëµ¥£ºÎĵµ- >¸Ä±ä±àÂ룬ÉèÖúóÓÖ»á»Øµ½È±Ê¡£¬²»ÖªµÀÓÐûÓÐÉèÖóɹ¦ Õâ¸öÉèÖÃÊÇÔÚÄãн¨Îļþʱ²ÅÉúЧµÄ£¬¶ÔÓÚÒ»¸ö´ò¿ªµÄÎļþÊDz»Æð×÷Óõġ£ > µÚ¶þ¸öÊDZàÂëÎÊÌ⣬ÔÚunlipadÔËÐÐÊÇ > > "C:\Python24\pythonw.exe" -u "C:\tt.py" > Traceback (most recent call last): > File "C:\tt.py", line 4, in ? > print u"哈哈" > UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: > ordinal not in range(128) > > > ¶øÔÚcmdÏ > > C:\Python24 >python -u C:\tt.py > ¹þ¹þ > 111 > > > ´úÂëÊÇ > #coding=utf-8 > > print u"¹þ¹þ" > > print 111 > > ÒòΪulipadʹÓÃÖض¨ÏòÀ´´¦Àí£¬ÕâÊǵײãµÄÒ»¸öÎÊÌ⣬ÎÒÄ¿Ç°²»ÖªµÀÈçºÎ½â¾ö¡£ÎÒÊÇʹÓÃwx.Execute()À´´¦ÀíµÄ£¬µÀÀíÊÇÒ»ÑùµÄ¡£ -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou _______________________________________________ python-chinese Post: send python-chinese在lists.python.cn Subscribe: send subscribe to python-chinese-request在lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070901/2733b56a/attachment.html
2007年09月01日 星期六 11:57
On 9/1/07, vsmb <vsmb在21cn.com> wrote: > > > 那在ulipad下如何输出中文?pydev是可以的。如果ulipad可以就太好了,速度快那么多。 > 在windows下将unicode转为gbk,ulipad可以直接输出gbk编码的字符串,所以如果是要输出unicode到输出中去,要先转换一下:如: #coding=utf-8 a = u'中文' print a.encode('gbk') -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月01日 星期六 12:39
okÁË vsmb 2007-09-01 ·¢¼þÈË£º limodou ·¢ËÍʱ¼ä£º 2007-09-01 12:05:12 ÊÕ¼þÈË£º python-chinese在lists.python.cn ³ËÍ£º Ö÷Ì⣺ Re: [python-chinese]·¢¾õulipad²»´í£¬µ«ËƺõÓÐЩÎÊÌâ On 9/1/07, vsmb <vsmb在21cn.com > wrote: > > > ÄÇÔÚulipadÏÂÈçºÎÊä³öÖÐÎÄ£¿pydevÊÇ¿ÉÒԵġ£Èç¹ûulipad¿ÉÒÔ¾ÍÌ«ºÃÁË£¬ËٶȿìÄÇô¶à¡£ > ÔÚwindowsϽ«unicodeתΪgbk,ulipad¿ÉÒÔÖ±½ÓÊä³ögbk±àÂëµÄ×Ö·û´®£¬ËùÒÔÈç¹ûÊÇÒªÊä³öunicodeµ½Êä³öÖÐÈ¥£¬ÒªÏÈת»»Ò»Ï£ºÈ磺 #coding=utf-8 a = u'ÖÐÎÄ' print a.encode('gbk') -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou _______________________________________________ python-chinese Post: send python-chinese在lists.python.cn Subscribe: send subscribe to python-chinese-request在lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070901/eb6ac8ca/attachment.htm
Zeuux © 2025
京ICP备05028076号