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

chaica at ohmytux.com chaica at ohmytux.com
Mon Aug 3 20:05:28 UTC 2009


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.

> Here is complete log from my clean sid chroot:
> 
> root at pbuilder:/# apt-get install reportbug locales-all
> [snip]
> Setting up libssl0.9.8 (0.9.8k-3) ...
> Setting up libdb4.5 (4.5.20-13) ...
> Setting up libsqlite3-0 (3.6.16-1) ...
> Setting up mime-support (3.46-1) ...
> update-alternatives: using /usr/bin/see to provide /usr/bin/view (view) in auto mode.
> Setting up python2.5-minimal (2.5.4-1) ...
> Setting up python2.5 (2.5.4-1) ...
> Setting up python-minimal (2.5.4-2) ...
> Setting up python (2.5.4-2) ...
> Setting up python-support (1.0.3) ...
> Setting up python-reportbug (4.5) ...
> Setting up reportbug (4.5) ...
> Setting up locales-all (2.9-23) ...
> Processing triggers for python-support ...
> root at pbuilder:/# su - nobody
> No directory, logging in with HOME=/
> nobody at pbuilder:/$ export LC_CTYPE=pl_PL.utf8
> nobody at pbuilder:/$ reportbug reportbug -s `printf "\xc3\xb3"` -O --template
> Warning: no reportbug configuration found.  Proceeding in novice mode.
> Detected character set: UTF-8
> Please change your locale if this is incorrect.
> 
> Using 'nobody <nobody at pbuilder.jwilk.net>' as your from address.
> Getting status for reportbug...
> Maintainer for reportbug is 'Reportbug Maintainers <reportbug-maint at lists.alioth.debian.org>'.
> Looking up dependencies of reportbug...
> 
> Traceback (most recent call last):
>    File "/usr/bin/reportbug", line 1888, in <module>
>      main()
>    File "/usr/bin/reportbug", line 905, in main
>      return iface.user_interface()
>    File "/usr/bin/reportbug", line 1820, in user_interface
>      message = u"Subject: %s\n%s" % (subject, message)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)

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.
> 
-- 
Carl Chenet




More information about the Reportbug-maint mailing list