command-not-found's output get garbled with ja_JP.EUC-jp locale

Bug #161160 reported by supernova
2
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
New
Undecided
Unassigned

Bug Description

% env LANG=ja_JP.EUC-JP /usr/bin/python /usr/lib/command-not-found -- emacs

the command above outputs UTF-8 encoding string. (EUC-JP is expected)

Using lgettext() insterd of gettext() solve the probelem.

http://www.python.org/doc/2.4.2/lib/node338.html

Here is patch.

--- /usr/share/pycentral/command-not-found/site-packages/CommandNotFound/CommandNotFound.py.orig 2007-09-25 18:41:04.000000000 +0900
+++ /usr/share/pycentral/command-not-found/site-packages/CommandNotFound/CommandNotFound.py 2007-11-09 19:41:21.000000000 +0900
@@ -2,7 +2,7 @@
 # Licensed under GPL, see COPYING for the whole text

 import sys, os, os.path, dbm, posix, grp
-from gettext import gettext as _
+from gettext import lgettext as _

 import apt_pkg
 from aptsources.sourceslist import SourcesList

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.