[Reportbug-maint] Bug#539736: Bug#539736: reportbug: --subject does not accept non-ASCII characters

Sandro Tosi morph at debian.org
Tue Aug 11 16:10:41 UTC 2009


On Mon, Aug 3, 2009 at 22:05, chaica at ohmytux.com<chaica at ohmytux.com> wrote:
> tags 539736 confirmed
> tags 539736 patch
> thanks
>
> Hi,
>
> Le lundi 03 août 2009 à 15:05 +0200, Jakub Wilk a écrit :
>> * Sandro Tosi <morph at debian.org>, 2009-08-03, 14:19:
>> >> I think you just terminated reportbug to early. (Sorry, my original report
>> >> was not precise enough.)
>> >
>> >yeah, better to have to complete, full transcript ;) it seemed it
>> >crashed right at the beginning
>> >
>> >> Could you try this non-interactive version?
>> >
>> >sure
>> Thanks for you patience. :)
>>
>> >> $ yes '' | PAGER=cat reportbug reportbug -s 'żółw' -O -o /dev/null
>> >
>> >$ yes '' | PAGER=cat reportbug reportbug -s 'żółw' -O -o /dev/null
>> [snip]
>> >(I removed some info not relevant here) except for the subject a bit
>> >weird, it worked fine.
>> That's really awkward: my investigation shown that the bug is triggered
>> only when gtk2 module is not present (which I intentionally disabled, as
>> you may recall).
>>
>
> You were right Jakub, having the python-gtk2 package forces reportbug to
> use utf-8 as default encoding. So Morph was not able to reproduce the
> bug.

oh now I see.

> If you don't have the python-gtk2  package, default encoding in
> reportbug is ascii. So trying to mix an utf8 string and a ascii string
> (with special caracter) will raise this exception.
>
> Here is a patch to solve this issue, converting the ascii string to utf8
> before using it.

what about setting

import sys
sys.setdefaultencoding('utf-8')

at the beginning of bin/reportbug ? we're in 2009, if you don't have a
utf8 system it's your fault, so forcing it might help other errors
like this to go away.

What do you think?

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi





More information about the Reportbug-maint mailing list