Re: Python 2.1 / 2.3: xreadlines not working with codecs.open

2005-06-28 Thread Richard Brodie
"Eric Brunel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Replying to myself. One more funny thing: > > >>> import codecs, xreadlines > >>> f = codecs.open('foo.txt', 'r', 'utf-8', 'replace') > >>> [l for l in xreadlines.xreadlines(f)] > [u'\ufffd\ufffd'] You've specified utf-

Re: Python 2.1 / 2.3: xreadlines not working with codecs.open

2005-06-28 Thread Peter Otten
Eric Brunel wrote: > I just found a problem in the xreadlines method/module when used with > codecs.open: the codec specified in the open does not seem to be taken > into account by xreadlines which also returns byte-strings instead of > unicode strings. > So f.xreadlines does not work, but xread

Re: Python 2.1 / 2.3: xreadlines not working with codecs.open

2005-06-28 Thread Eric Brunel
On Thu, 23 Jun 2005 14:23:34 +0200, Eric Brunel <[EMAIL PROTECTED]> wrote: > Hi all, > > I just found a problem in the xreadlines method/module when used with > codecs.open: the codec specified in the open does not seem to be taken into > account by xreadlines which also returns byte-strings ins