Sorry Kovid, I was writing my reply as you posted yours.
I think the problem is either the command line arguments are not being converted to python unicode strings from the get go, or, somewhere along the line the string variable containing the output filename is being converted to ascii or some other encoding.
The open method must be a true python unicode string not a utf-8 encoded string.
|