Ivan Vilata i Balaguer <[EMAIL PROTECTED]> added the comment: What I find most bothersome is that ``optparse`` is being inconsistent in the types of localised strings it expects. It needs Unicode strings for snippets forming part of the help message, while it expects normal strings in other places like ``OptionParser.error()`` --a fact which isn't documented at all, BTW.
I've been developing a medium app lately with localised messages all over the place using several packages in the standard library and ``optarparse``'s help messages are the only place where Unicode strings have been required. I'm not saying that ``optparse`` shouldn't use Unicode, but it'd be nice if it was consistent and the fact was documented. I'm attaching a tiny script which uses ``optparse``. Just try to change any appearance of the ``s`` normal string to Unicode ``us`` or vice-versa, then call the program with ``--help`` or no arguments (it requires one) and you get a ``UnicodeError``. Thanks! ---------- nosy: +ivilata Added file: http://bugs.python.org/file10649/optparse_unicode.py _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2931> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com