[issue35009] argparse throws UnicodeEncodeError for printing help with unicode choices

2018-12-22 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks Serhiy, I have limited knowledge of unicode and hence I thought this to be a fix. I am closing this as per msg332337 and the PR I opened for issue24307 (Feel free to close issue24307 as per Victor's resolution if needed) -- resolutio

[issue35009] argparse throws UnicodeEncodeError for printing help with unicode choices

2018-12-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even if you encode default values for output, you can not pass unicode values from command line. You can pass a 8-bit string '\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd' which differs from a Unicode string u"早上好". Even after resolving the output issue, unicode ch

[issue35009] argparse throws UnicodeEncodeError for printing help with unicode choices

2018-10-17 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : argparse module uses str() in a few places where passing unicode strings will throw UnicodeDecodeError. In Python 3 these scripts run fine since Python 3 has unicode strings by default. I am working on this along with finding more places where thi