Source Encoding GBK/GB2312
Kent Johnson
kent37 at tds.net
Wed Feb 23 23:51:26 EST 2005
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?
GB2312 is supported in Python 2.4.
GB2312 support can be added to Python 2.3 with the CJKCodecs package:
http://cjkpython.i18n.org/
Kent
>
> -
> narke
>
More information about the Python-list
mailing list