Source Encoding GBK/GB2312

limodou limodou at gmail.com
Wed Feb 23 23:45:37 EST 2005


2.4 support gb2312, gbk, gb18030 and cjk codec.
you can also move these things to 2.3.


On Wed, 23 Feb 2005 22:34:02 -0600, Steve Holden <steve at holdenweb.com> wrote:
> steven at lczmsoft.com wrote:
> 
> > When I specify an source encoding such as:
> >
> > # -*- coding: GBK -*-
> > or
> > # -*- coding: GB2312 -*-
> >
> > as the first line of source, I got the following error:
> >
> > SyntaxError: 'unknown encoding: GBK'
> >
> >
> > Does this mean Python does not support GBK/GB2312?  What do I do?
> >
> 
> Well, *your* Python might not support GTK:
> 
> sholden at dellboy ~
> $ cat test90.py
> # -*- coding: GBK -*-
> 
> print "Hello!"
> 
> sholden at dellboy ~
> $ python test90.py
> Hello!
> 
> but Python generally appears to. Do you have encodings/gbk.py in your
> library?
> 
> regards
>   Steve
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 


-- 
I like python! 
My Blog: http://www.donews.net/limodou
New Maillist: http://groups-beta.google.com/group/python-cn



More information about the Python-list mailing list