* Sandro Tosi <mo...@debian.org>, 2009-08-27, 21:52:
what about setting
import sys
sys.setdefaultencoding('utf-8')
at the beginning of bin/reportbug ?
That would be totally wrong (even though the gtk module actually seems to be
doing something like this). Let me quote GvR[1]:
So, what are you proposing?
if the alternative is to encode/decode each string we have to print on
screen because in 2009 there are still users not using utf8 shells,
then I'm fine with this change and to deal with the fallback.
You missed my point. Setting default encoding in Python 2.x would be
invalid even if the whole world were using UTF-8. That's why this
function is absent from the sys module by default.
Issue with printing can be solved easily: just replace sys.stdout and
sys.stderr with custom wrappers that encodes (with errors='replace')
Unicode strings for you.
Side note: As long as a locale is supported by libc, it is not a user
"fault" that he/she is using it. Keep in mind that not every piece of
software in Debian support UTF-8 [1], so one could have a good reason to
use a legacy encoding.
[1] In fact, even coreutils does not:
http://bugs.debian.org/139861
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/91175
--
Jakub Wilk
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org