Package: reportbug Version: 4.4 Severity: important When reporting a bug against gnome-terminal, reportbug crashed with the following exception
Traceback (most recent call last): File "/usr/bin/reportbug", line 1877, in <module> main() File "/usr/bin/reportbug", line 895, in main return iface.user_interface() File "/usr/bin/reportbug", line 1436, in user_interface version=pkgversion) File "/usr/lib/pymodules/python2.5/reportbug/ui/text_ui.py", line 534, in handle_bts_query mirrors, http_proxy, screen, title) File "/usr/lib/pymodules/python2.5/reportbug/ui/text_ui.py", line 616, in browse_bugs sys.stderr.write(line.decode('utf-8').encode(output_encoding, "replace")) File "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 78-79: unexpected end of data The failure occurs when the variable contains the following value: ' 56) #522628 gnome-terminal: duplicate access keys for menu bar: \xe2\x80\x9cTerminal\xe2\n' It seems that line is truncated somehow in the middle of the utf-8 character because line[78:79] is '\xe2' instead of: >>> u'”'.encode('utf-8') '\xe2\x80\x9d' >From a quick look at the code, I think decoding should happen as soon as possible, and from there, working internally with unicode strings, and then, as late as possible, just before output, encode. Anyhow, truncation is good with the unicode string: >>> line2 = ' 56) #522628 gnome-terminal: duplicate access keys for menu bar: >>> \xe2\x80\x9cTerminal\xe2\x80\x9d, \xe2\x80\x9cTabs\xe2\x80\x9d\n' >>> line2[:79] ' 56) #522628 gnome-terminal: duplicate access keys for menu bar: \xe2\x80\x9cTerminal\xe2' >>> line2.decode('utf-8')[:79]u' 56) #522628 gnome-terminal: duplicate access >>> keys for menu bar: \u201cTerminal\u201d, ' Cheers, Alex -- Package-specific info: ** Environment settings: EDITOR="vi" VISUAL="vi" DEBEMAIL="Alexandre Rossi <alexandre.ro...@gmail.com>" EMAIL="Alexandre Rossi <alexandre.ro...@gmail.com>" INTERFACE="text" ** /home/niol/.reportbugrc: reportbug_version "3.31" mode standard ui text -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.28.9-vgn-b1vp (PREEMPT) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages reportbug depends on: ii apt 0.7.21 Advanced front-end for dpkg ii python 2.5.4-2 An interactive high-level object-o ii python-reportbug 4.4 Python modules for interacting wit reportbug recommends no packages. Versions of packages reportbug suggests: pn debconf-utils <none> (no description available) pn debsums <none> (no description available) pn dlocate <none> (no description available) ii file 5.03-1 Determines file type using "magic" ii gnupg 1.4.9-4 GNU privacy guard - a free PGP rep ii postfix [mail-transport-agent 2.5.5-1.1 High-performance mail transport ag pn python-gnome2-extras <none> (no description available) ii python-gtk2 2.14.1-3 Python bindings for the GTK+ widge pn python-urwid <none> (no description available) pn python-vte <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org