I have a large (gigabytes) file which is encoded in UTF-8 and then
compressed with gzip.  I'd like to read it with the "gzip" module
and "utf8" decoding.  The obvious approach is

        fd = gzip.open(fname, 'rb',encoding='utf8')

But "gzip.open" doesn't support an "encoding" parameter.  (It
probably should, for consistency.)  Is there some way to do this?
Is it possible to express "unzip, then decode utf8" via
"codecs.open"?

                                John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to