In article <mailman.5001.1388976943.18130.python-l...@python.org>, Chris Angelico <ros...@gmail.com> wrote:
> It can't be both things. It's either bytes or it's text. I've never used Python 3, so forgive me if these are naive questions. Let's say you had an input stream which contained the following hex values: $ hexdump data 0000000 d7 a8 a3 88 96 95 That's EBCDIC for "Python". What would I write in Python 3 to read that file and print it back out as utf-8 encoded Unicode? Or, how about a slightly different example: $ hexdump data 0000000 43 6c 67 75 62 61 That's "Python" in rot-13 encoded ascii. How would I turn that into cleartext Unicode in Python 3? -- https://mail.python.org/mailman/listinfo/python-list