Python论坛  - 讨论区

标题:[python-chinese] 关于源代码文件的编码转换

2007年11月29日 星期四 18:34

昆仑 jackyboy在163.com
星期四 十一月 29 18:34:52 HKT 2007

ÓÐûÓÐʲô¹¤¾ß£¬¿ÉÒԺܷ½±ãµÄ¶ÔÔ´ÎļþÔÚUTF-8,ASCIIÖ®¼äת»»µÄ£¿ÎÒÓÃULTRAEDITת»»µÄʱºò£¬ÓÐʱºò»áÓöµ½½«Ô´ÂëÀïµÄºº×Öת³ÉÂÒÂëÁ˵ÄÇé¿ö¡£¡£¡£¡£


2007-11-29 



À¥ÂØ 
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071129/0f94f61d/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 19:16

Jiahua Huang jhuangjiahua在gmail.com
星期四 十一月 29 19:16:12 HKT 2007

ascii?

估计你被 notepad.exe 里错误的编码叫法给弄混了

On Nov 29, 2007 6:34 PM, 昆仑 <jackyboy at 163.com> wrote:
>
>
> 有没有什么工具,可以很方便的对源文件在UTF-8,ASCII之间转换的?我用ULTRAEDIT转换的时候,有时候会遇到将源码里的汉字转成乱码了的情况。。。。
>
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月29日 星期四 20:47

Tao Fei filia.tao在gmail.com
星期四 十一月 29 20:47:55 HKT 2007

notepad ++
ASCII  <-> UTF8 -无BOM 头  <-> UTF8 之间转换很方便.

On Nov 29, 2007 6:34 PM, 昆仑 <jackyboy在163.com> wrote:
>
>
> 有没有什么工具,可以很方便的对源文件在UTF-8,ASCII之间转换的?我用ULTRAEDIT转换的时候,有时候会遇到将源码里的汉字转成乱码了的情况。。。。
>
>
> 2007-11-29 ________________________________
>
> 昆仑
> _______________________________________________
> 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
>



-- 
Tao Fei (陶飞)
My Blog: blog.filia.cn
My Summer Of Code Blog: filiasoc.blogspot.com

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 09:06

lrython在gmail.com lrython在gmail.com
星期五 十一月 30 09:06:15 HKT 2007

昆仑 写道:
> 有没有什么工具,可以很方便的对源文件在UTF-8,ASCII之间转换的?我用
> ULTRAEDIT转换的时候,有时候会遇到将源码里的汉字转成乱码了的情况。。。。
windows下这种问题比较好解决吧,linux下可以设置vim,或者用iconv。

> 2007-11-29
> ------------------------------------------------------------------------
> 昆仑
> ------------------------------------------------------------------------
>
>   


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 09:53

昆仑 jackyboy在163.com
星期五 十一月 30 09:53:09 HKT 2007

ÊÇULTRAEDITÀïÕâÑù½ÐµÄѽ¡£

²»¹ýÕâЩUTF-8,UTF-8(UNICODE),gbk,gb2312ʲôµÄÎÒµÄÈ·Ò²ºýÍ¿£¬¸øÔÛ˵˵°É£¿


2007-11-30 



À¥ÂØ 



·¢¼þÈË£º Jiahua Huang 
·¢ËÍʱ¼ä£º 2007-11-29  19:17:03 
ÊÕ¼þÈË£º python-chinese在lists.python.cn 
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]¹ØÓÚÔ´´úÂëÎļþµÄ±àÂëת»» 
 
ascii£¿

¹À¼ÆÄã±» notepad.exe Àï´íÎóµÄ±àÂë½Ð·¨¸øÅª»ìÁË

On Nov 29, 2007 6:34 PM, À¥ÂØ  <jackyboy在163.com > wrote:
>
>
> ÓÐûÓÐʲô¹¤¾ß£¬¿ÉÒԺܷ½±ãµÄ¶ÔÔ´ÎļþÔÚUTF-8,ASCIIÖ®¼äת»»µÄ£¿ÎÒÓÃULTRAEDITת»»µÄʱºò£¬ÓÐʱºò»áÓöµ½½«Ô´ÂëÀïµÄºº×Öת³ÉÂÒÂëÁ˵ÄÇé¿ö¡£¡£¡£¡£
>
>
_______________________________________________
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/20071130/62be29d5/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 10:04

beck917 beck917在gmail.com
星期五 十一月 30 10:04:29 HKT 2007

Èç¹ûÅúÁ¿µÄ»°lz¿ÉÒÔÊÔÊÔÎÒÓÃpythonдµÄÕâ¸öת»»Ð¡³ÌÐò

ÔÚ¸½¼þÀï

ÉèÖÃϲÎÊý¾Í¿ÉÒÔDECODEÊǵ±Ç°±àÂë,ENCODEÊÇҪת»»ºóµÄ±àÂë


ÔÚ07-11-30£¬À¥ÂØ <jackyboy在163.com> дµÀ£º
>
>  ÊÇULTRAEDITÀïÕâÑù½ÐµÄѽ¡£
>
> ²»¹ýÕâЩUTF-8,UTF-8(UNICODE),gbk,gb2312ʲôµÄÎÒµÄÈ·Ò²ºýÍ¿£¬¸øÔÛ˵˵°É£¿
>
>
> 2007-11-30
> ------------------------------
>  À¥ÂØ
> ------------------------------
>  *·¢¼þÈË£º* Jiahua Huang
> *·¢ËÍʱ¼ä£º* 2007-11-29  19:17:03
> *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> *³­ËÍ£º*
> *Ö÷Ì⣺* Re: [python-chinese]¹ØÓÚÔ´´úÂëÎļþµÄ±àÂëת»»
>   ascii£¿
>
> ¹À¼ÆÄã±» notepad.exe Àï´íÎóµÄ±àÂë½Ð·¨¸øÅª»ìÁË
>
> On Nov 29, 2007 6:34 PM, À¥ÂØ  <jackyboy在163.com > wrote:
> >
> >
>
> > ÓÐûÓÐʲô¹¤¾ß£¬¿ÉÒԺܷ½±ãµÄ¶ÔÔ´ÎļþÔÚUTF-8,ASCIIÖ®¼äת»»µÄ£¿ÎÒÓÃULTRAEDITת»»µÄʱºò£¬ÓÐʱºò»áÓöµ½½«Ô´ÂëÀïµÄºº×Öת³ÉÂÒÂëÁ˵ÄÇé¿ö¡£¡£¡£¡£
> >
> >
> _______________________________________________
> 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
>
> _______________________________________________
> 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/20071130/a5c80aff/attachment.htm 
-------------- 下一部分 --------------
Ò»¸ö·ÇÎı¾¸½¼þ±»Çå³ý...
·¢ÐÅÈË: %(who)s
Ö÷Ìâ: %(subject)s
ÈÕÆÚ: %(date)s
´óС: 1520
Url: http://python.cn/pipermail/python-chinese/attachments/20071130/a5c80aff/attachment.py 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 14:24

jingkon skyamp yotusky在gmail.com
星期五 十一月 30 14:24:11 HKT 2007

ʹÓÃeditplus¿ÉÒÔת»»£¬Ó¦¸Ã²»»á³öÏÖÖÐÎÄÂÒÂëÎÊÌâ¡£

ÔÚ07-11-30£¬beck917 <beck917在gmail.com> дµÀ£º
>
>
> Èç¹ûÅúÁ¿µÄ»°lz¿ÉÒÔÊÔÊÔÎÒÓÃpythonдµÄÕâ¸öת»»Ð¡³ÌÐò
>
> ÔÚ¸½¼þÀï
>
> ÉèÖÃϲÎÊý¾Í¿ÉÒÔDECODEÊǵ±Ç°±àÂë,ENCODEÊÇҪת»»ºóµÄ±àÂë
>
>
> ÔÚ07-11-30£¬À¥ÂØ <jackyboy在163.com > дµÀ£º
> >
> >  ÊÇULTRAEDITÀïÕâÑù½ÐµÄѽ¡£
> >
> > ²»¹ýÕâЩUTF-8,UTF-8(UNICODE),gbk,gb2312ʲôµÄÎÒµÄÈ·Ò²ºýÍ¿£¬¸øÔÛ˵˵°É£¿
> >
> >
> > 2007-11-30
> > ------------------------------
> >  À¥ÂØ
> > ------------------------------
> >  *·¢¼þÈË£º* Jiahua Huang
> > *·¢ËÍʱ¼ä£º* 2007-11-29  19:17:03
> > *ÊÕ¼þÈË£º* python-chinese在lists.python.cn
> > *³­ËÍ£º*
> > *Ö÷Ì⣺* Re: [python-chinese]¹ØÓÚÔ´´úÂëÎļþµÄ±àÂëת»»
> >   ascii£¿
> >
> > ¹À¼ÆÄã±» notepad.exe Àï´íÎóµÄ±àÂë½Ð·¨¸øÅª»ìÁË
> >
> > On Nov 29, 2007 6:34 PM, À¥ÂØ  <jackyboy在163.com > wrote:
> > >
> > >
> >
> > > ÓÐûÓÐʲô¹¤¾ß£¬¿ÉÒԺܷ½±ãµÄ¶ÔÔ´ÎļþÔÚUTF-8,ASCIIÖ®¼äת»»µÄ£¿ÎÒÓÃULTRAEDITת»»µÄʱºò£¬ÓÐʱºò»áÓöµ½½«Ô´ÂëÀïµÄºº×Öת³ÉÂÒÂëÁ˵ÄÇé¿ö¡£¡£¡£¡£
> > >
> > >
> > _______________________________________________
> > 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
> >
> > _______________________________________________
> > 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
> >
>
>
> _______________________________________________
> 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/20071130/9ae444bf/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年11月30日 星期五 15:12

昆仑 jackyboy在163.com
星期五 十一月 30 15:12:58 HKT 2007

ÇëÎÊÔõô»ñÈ¡µ±Ç°Êä³öÉ豸µÄ´úÂëÒ³ÄØ£¿

Èç¹ûËùÓеÄpyÔ´Âë¶¼ÓÃUTF-8£¬Êä³öµÄʱºòÒ²»¹ÊÇÐèҪתµ½ÏàÓ¦´úÂëÒ³²Å¶ÔµÄ¡£

±ÈÈçÎÒÔÚWINDOWSϵÄDOS´°¿Ú£¬´úÂëÒ³ÊÇCP936£¨GBK£©£¬ÎÒUTF8µÄ³ÌÐòÊä³öÖÐÎÄÒ²ÊÇÒ»¶ÑÂÒÂë¡£
¶øÎÒÔÚeclipseÀïÉèÖÃrun dialogÀïÊÇUTF-8¾ÍÊÇÕý³£µÄ¡£

Èç¹ûÎÒ³ÌÐòÀï¿ÉÒÔ»ñÈ¡µ½Êä³öÉ豸µÄ´úÂëÒ³Ó¦¸Ã¾Í¿ÉÒÔÖ±½Ó½«Êä³öµÄÖÐÎÄÏÈdecode(utf-8)ÔÙÓûñÈ¡µ½µÄencode¾ÍÓ¦¸Ã¿ÉÒÔÕý³£Êä³öÁËÊǰÑ

( sys.stdout ÊÇprintµÄµ±Ç°É豸°É£¬Èç¹ûÊÇwxPythonµÄ´°¿ÚºÍ²Ëµ¥£¬ÓÖÒªÕâô¶¨Òå×Ö·û¼¯ÄØ£¿)


2007-11-30 



À¥ÂØ 



·¢¼þÈË£º jingkon skyamp 
·¢ËÍʱ¼ä£º 2007-11-30  14:24:33 
ÊÕ¼þÈË£º python-chinese在lists.python.cn 
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]¹ØÓÚÔ´´úÂëÎļþµÄ±àÂëת»» 
 
ʹÓÃeditplus¿ÉÒÔת»»£¬Ó¦¸Ã²»»á³öÏÖÖÐÎÄÂÒÂëÎÊÌâ¡£


ÔÚ07-11-30£¬beck917 <beck917在gmail.com> дµÀ£º

Èç¹ûÅúÁ¿µÄ»°lz¿ÉÒÔÊÔÊÔÎÒÓÃpythonдµÄÕâ¸öת»»Ð¡³ÌÐò

ÔÚ¸½¼þÀï

ÉèÖÃϲÎÊý¾Í¿ÉÒÔDECODEÊǵ±Ç°±àÂë,ENCODEÊÇҪת»»ºóµÄ±àÂë



ÔÚ07-11-30£¬À¥ÂØ < jackyboy在163.com > дµÀ£º
ÊÇULTRAEDITÀïÕâÑù½ÐµÄѽ¡£

²»¹ýÕâЩUTF-8,UTF-8(UNICODE),gbk,gb2312ʲôµÄÎÒµÄÈ·Ò²ºýÍ¿£¬¸øÔÛ˵˵°É£¿


2007-11-30 



À¥ÂØ 



·¢¼þÈË£º Jiahua Huang 
·¢ËÍʱ¼ä£º 2007-11-29  19:17:03 
ÊÕ¼þÈË£º python-chinese在lists.python.cn 
³­ËÍ£º 
Ö÷Ì⣺ Re: [python-chinese]¹ØÓÚÔ´´úÂëÎļþµÄ±àÂëת»» 
ascii£¿

¹À¼ÆÄã±» notepad.exe Àï´íÎóµÄ±àÂë½Ð·¨¸øÅª»ìÁË

On Nov 29, 2007 6:34 PM, À¥ÂØ  <jackyboy在163.com > wrote:
>
>
> ÓÐûÓÐʲô¹¤¾ß£¬¿ÉÒԺܷ½±ãµÄ¶ÔÔ´ÎļþÔÚUTF-8,ASCIIÖ®¼äת»»µÄ£¿ÎÒÓÃULTRAEDITת»»µÄʱºò£¬ÓÐʱºò»áÓöµ½½«Ô´ÂëÀïµÄºº×Öת³ÉÂÒÂëÁ˵ÄÇé¿ö¡£¡£¡£¡£
>
>
_______________________________________________
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 

_______________________________________________
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



_______________________________________________
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/20071130/0fa6fcbd/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号