I18n issue with optik
Thorsten Kampe
thorsten at thorstenkampe.de
Sun Apr 1 15:48:11 EDT 2007
* Thorsten Kampe (Sun, 1 Apr 2007 20:22:51 +0100)
> * Thorsten Kampe (Sun, 1 Apr 2007 20:08:39 +0100)
> > * Thorsten Kampe (Sun, 1 Apr 2007 19:45:59 +0100)
> > > Yes, I could do that but I'd rather know first if my code is wrong or
> > > the optparse code.
> >
> > It might be the bug mentioned in
> > http://mail.python.org/pipermail/python-dev/2006-May/065458.html
> >
> > The patch although doesn't work. From my unicode-charset-codepage-
> > codeset-challenged point of view the encoding of sys.stdout doesn't
> > matter. The charset is defined in the .po/.mo file (but of course
> > optparse can't know if the message has been translated by gettext
> > ("_").
>
> If I "patch" line 1648 (the one mentioned in the traceback) of
> optparse.py from
>
> file.write(self.format_help().encode(encoding, "replace"))
> to
> file.write(self.format_help())
>
> ...then everything works and is displayed fine [...]
...but only in Cygwin rxvt, the standard Windows console doesn't show
the right colors.
I give up and revert back to ASCII. This whole charset mess is not
meant to solved by mere mortals.
Thorsten
More information about the Python-list
mailing list