How to emit UTF-8 from console mode?

"Martin v. Löwis" martin at v.loewis.de
Wed Oct 1 21:12:24 CEST 2008


> But what are we doing here? Can you convince me that we are emitting UTF-8? 

Most definitely not. We are emitting cp1251.

> I need UTF-8 because I need to experiment with some OS function calls that 
> give me UTF-16 and I need to emit UTF-16 or UTF-8.

Try setting the code page to 65001, and emit the UTF-8 explicitly.

Regards,
Martin



More information about the Python-list mailing list