This bug affects me too when running "apport-cli -f" when
LANG=fi_FI.UTF-8. The issue is in Apport using apport.unicode_gettext
and then sys.stdout.writing the result, which doesn't convert the
unicode strings to the locale charset before output. The simple patch to
fix this is the following:

--- /usr/bin/apport-cli.old     2009-09-26 00:57:57.000000000 +0300
+++ /usr/bin/apport-cli 2009-09-28 14:25:22.094302370 +0300
@@ -36,7 +36,7 @@
     def raw_input_char(self, text):
         '''raw_input, but read only one character'''
 
-        sys.stdout.write(text + ' ')
+        print text,
 
         file = sys.stdin.fileno()
         saved_attributes = termios.tcgetattr(file)

If for some reason you don't want to use the "print text," special
syntax, an alternative is the following:

--- /usr/bin/apport-cli.old     2009-09-26 00:57:57.000000000 +0300
+++ /usr/bin/apport-cli 2009-09-28 14:46:41.276150836 +0300
@@ -36,7 +36,7 @@
     def raw_input_char(self, text):
         '''raw_input, but read only one character'''
 
-        sys.stdout.write(text + ' ')
+        sys.stdout.write(text.encode(sys.stdout.encoding) + ' ')
 
         file = sys.stdin.fileno()
         saved_attributes = termios.tcgetattr(file)

-- 
ubuntu-bug crashes with LANG=fi_FI.UTF-8
https://bugs.launchpad.net/bugs/432954
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to