On Sun, 27 Jan 2008 02:18:48 -0800, glacier wrote:

> Yepp. I feed SAX with the unicode string since SAX didn't support my
> encoding system(GBK).

If the `decode()` method supports it, IMHO SAX should too.

> Is there any way to solve this better?
> I mean if I shouldn't convert the GBK string to unicode string, what
> should I do to make SAX work?

Decode it and then encode it to utf-8 before feeding it to the parser.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to