> Hardwiring the encoding is not a good idea, esp. since there > are lots of alternatives for you to get readable output from > PyUnicode object now and without any changes to the interpreter. > > E.g. > > print '%s' % u.encode('utf-8')
We are talking about Python 3 here, so it is fairly important that you consider all syntactic and semantic details of Python 3 - otherwise it is not clear whether or not you are aware of them: - the print syntax is incorrect - .encode returns a byte string - therefore, %s applies __str__ to the byte string, yielding something like b'...', with hex escapes for the non-ASCII bytes > There are many ways to solve your problem. No. If you strike out those that don't actually work, close to none remain. Regards, Martin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com