codecs UTF_streamreader()

Martin von Loewis loewis at informatik.hu-berlin.de
Fri Jan 25 05:02:54 EST 2002


David Phoon <david.phoon at retriever.com.au> writes:

> output = UTF8_streamwriter( open(
> '/home/david/davidwk/python/testmime/a.txt', 'wb') )
> output.write( unistr )
> output.close()
> 
> input = UTF8_streamreader( open(
> '/home/david/davidwk/python/testmime/a1.txt', 'rb') )
> print repr(input.read())
> input.close()

If you open a.txt, instead of a1.txt, in the second call, your program
works fine.

Regards,
Martin



More information about the Python-list mailing list