* Thorsten Kampe (Mon, 2 Apr 2007 16:05:25 +0100)
> * Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600)
> > Thorsten Kampe wrote:
> > I'm not very experienced with internationalization, but if you change::
> >
> > gettext.install('test')
> >
> > to::
> >
> > gettext.install('test', unic
* Damjan (Mon, 02 Apr 2007 18:29:06 +0200)
> > Actually rxvt, Poderosa and console have the ability to display non-
> > ASCII characters. I use the dejavu fonts that support non-ASCII, too.
> >
> > But the problem is even simpler: I can't even set the standard Windows
> > console ("cmd") to Window
> Actually rxvt, Poderosa and console have the ability to display non-
> ASCII characters. I use the dejavu fonts that support non-ASCII, too.
>
> But the problem is even simpler: I can't even set the standard Windows
> console ("cmd") to Windows 1252 in Python. Although directly executing
> "chc
* paul (Mon, 02 Apr 2007 17:49:15 +0200)
> Thorsten Kampe schrieb:
> [snipp]
> > I got the tip to set a different encoding by
> > sys.stdout = codecs.EncodedFile(sys.stdout, 'utf-8')
> >
> > but unfortunately this does not change the encoding of any Terminal.
> > So my question is: how can I set
Thorsten Kampe schrieb:
[snipp]
> I got the tip to set a different encoding by
> sys.stdout = codecs.EncodedFile(sys.stdout, 'utf-8')
>
> but unfortunately this does not change the encoding of any Terminal.
> So my question is: how can I set a different encoding to sys.stdout
> (or why can I set
* Jarek Zgoda (Mon, 02 Apr 2007 17:52:34 +0200)
> Thorsten Kampe napisa?(a):
>
> > I can't see the "solution" here. Is the optparse "print_help" function
> > wrong? Why should there even be errors if I use "unicode = True" with
> > gettext.install?
> >
> > I have ISO-8859-15 gettext translation
* Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600)
> Thorsten Kampe wrote:
> I'm not very experienced with internationalization, but if you change::
>
> gettext.install('test')
>
> to::
>
> gettext.install('test', unicode=True)
>
> what happens?
Actually, this is the solution.
But t
Thorsten Kampe napisał(a):
> I can't see the "solution" here. Is the optparse "print_help" function
> wrong? Why should there even be errors if I use "unicode = True" with
> gettext.install?
>
> I have ISO-8859-15 gettext translations and I want optparse to display
> them correctly. What do I
* Jarek Zgoda (Sun, 01 Apr 2007 22:02:15 +0200)
> Thorsten Kampe napisa?(a):
>
> >>> Under Windows I get " File "G:\program files\python\lib\encodings
> >>> \cp1252.py", line 12, in encode
> >>>return codecs.charmap_encode(input,errors,encoding_table)"
> >> I'm not very experienced with intern
* Leo Kislov (1 Apr 2007 14:24:17 -0700)
> On Apr 1, 8:47 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> > I guess the culprit is this snippet from optparse.py:
> >
> > # used by test suite
> > def _get_encoding(self, file):
> > encoding = getattr(file, "encoding", None)
> > if not encodin
On Apr 1, 8:47 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> I guess the culprit is this snippet from optparse.py:
>
> # used by test suite
> def _get_encoding(self, file):
> encoding = getattr(file, "encoding", None)
> if not encoding:
> encoding = sys.getdefaultencoding()
>
Thorsten Kampe napisał(a):
>>> Under Windows I get " File "G:\program files\python\lib\encodings
>>> \cp1252.py", line 12, in encode
>>>return codecs.charmap_encode(input,errors,encoding_table)"
>> I'm not very experienced with internationalization, but if you change::
>>
>> gettext.insta
* 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
* 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/06545
* 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-chars
* Steven Bethard (Sun, 01 Apr 2007 10:26:54 -0600)
> Thorsten Kampe wrote:
> > I guess the culprit is this snippet from optparse.py:
> >
> > # used by test suite
> > def _get_encoding(self, file):
> > encoding = getattr(file, "encoding", None)
> > if not encoding:
> > encoding = sy
* Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600)
> Thorsten Kampe wrote:
> > * Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600)
> >> Thorsten Kampe wrote:
> >>> I've written a script which uses Optik/Optparse to display the
> >>> options (which works fine). The text for the help message is local
Thorsten Kampe wrote:
> I guess the culprit is this snippet from optparse.py:
>
> # used by test suite
> def _get_encoding(self, file):
> encoding = getattr(file, "encoding", None)
> if not encoding:
> encoding = sys.getdefaultencoding()
> return encoding
>
> def print_help(se
Thorsten Kampe wrote:
> * Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600)
>> Thorsten Kampe wrote:
>>> I've written a script which uses Optik/Optparse to display the
>>> options (which works fine). The text for the help message is localised
>>> (with german umlauts) and when I execute the script
I guess the culprit is this snippet from optparse.py:
# used by test suite
def _get_encoding(self, file):
encoding = getattr(file, "encoding", None)
if not encoding:
encoding = sys.getdefaultencoding()
return encoding
def print_help(self, file=None):
"""print_help(file : f
Just an addition : when I insert this statement...
print _('THIS SOFTWARE COMES WITHOUT WARRANTY, LIABILITY OR SUPPORT!')
into this skript, the line is printed out. So if my Skript can output
the localised text but Optparse can't it should be an optparse bug,
right?!
Thorsten
--
http://mail.p
* Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600)
> Thorsten Kampe wrote:
> > I've written a script which uses Optik/Optparse to display the
> > options (which works fine). The text for the help message is localised
> > (with german umlauts) and when I execute the script with the localised
> >
Thorsten Kampe wrote:
> I've written a script which uses Optik/Optparse to display the
> options (which works fine). The text for the help message is localised
> (with german umlauts) and when I execute the script with the localised
> environment variable set, I get this traceback[1]. The intere
Hi,
I've written a script which uses Optik/Optparse to display the
options (which works fine). The text for the help message is localised
(with german umlauts) and when I execute the script with the localised
environment variable set, I get this traceback[1]. The interesting
thing is that the
24 matches
Mail list logo