[issue2931] optparse: various problems with unicode and gettext
Sam Pablo Kuper
report at bugs.python.org
Tue Jun 17 17:59:34 CEST 2008
Sam Pablo Kuper <sam.kuper at uclmail.net> added the comment:
Using non-ASCII characters in an optparse help string also causes
UnicodeDecodeErrors. Here's the relevant part of the traceback:
File "/home/spk30/opt/ActivePython-2.5/lib/python2.5/optparse.py", line
1655, in print_help
file.write(self.format_help().encode(encoding, "replace"))
NB. Adding an encoding declaration at the beginning of the python
script which used a non-ASCII character in an optparse help string
didn't solve the problem.
----------
nosy: +sampablokuper
versions: +Python 2.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2931>
_______________________________________
More information about the Python-bugs-list
mailing list