[Tutor] Unicode Encode Error
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Thu Apr 27 21:07:14 CEST 2006
> You're right, I realised after playing with Tim's example that the
> problem was that I wasn't calling close() on the codecs file. Adding
> this after the f.write(html_text) seems to flush the buffer which means
> that the content now gets written to the file.
Hi Frank,
Quick note: it may be important to write and read from the file using
binary mode "b". It's not so significant under Unix, but it is more
significant under Windows, because otherwise we may get some weird
results.
Good luck!
More information about the Tutor
mailing list