On Thu, Dec 22, 2011 at 2:17 PM, Peter Otten <__pete...@web.de> wrote:
> You are now one step further, you have successfully* decoded the file. > The remaining step is to encode the resulting unicode lines back into > bytes. > The encoding implicitly used by the print statement is sys.stdout.encoding > which is either "ascii" or None in your case. Try to encode explicitly to > UTF-8 with > > f = codecs.open(p + "2.txt", "r", "iso-8859-1") > for line in f: > print line.encode("utf-8") > > > OOEEE! Thanks! Stan
-- http://mail.python.org/mailman/listinfo/python-list