[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Duplicity-talk] Fwd: [PATCH] --help with non-ascii system locale
From: |
edgar . soldin |
Subject: |
[Duplicity-talk] Fwd: [PATCH] --help with non-ascii system locale |
Date: |
Mon, 10 Oct 2011 15:11:47 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 |
while having a look at this it occurred to me that the tgz releases are missing
po files.
e.g. de
ken, could you please have a look at this?
..ede
-------- Original Message --------
Subject: [Duplicity-talk] [PATCH] --help with non-ascii system locale
Date: Mon, 10 Oct 2011 01:26:35 +0200
From: Wolfgang <address@hidden>
Reply-To: Discussion of the backup program duplicity <address@hidden>
To: address@hidden
File "/usr/lib/python2.7/optparse.py", line 1669, in print_help
file.write(self.format_help().encode(encoding, "replace"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2114:
ordinal not in range(128)
this is duplicity 0.6.15
LANG is de_DE.UTF-8
the help string passed to optparse is type str, containing utf-8 text.
The bug disappears if I change /usr/lib/python2.7/optparse.py:
- file.write(self.format_help().encode(encoding, "replace"))
+ file.write(self.format_help().decode('utf-8').encode(encoding,
"replace"))
but that is of course not the right fix.
I found some hints about possible solutions but did not try to fix
it myself at this link:
http://stackoverflow.com/questions/5545197/utf-8-error-with-python-and-gettext