[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#435047: /usr/lib/hplip/base/g.py: assumes en_US.UTF-8 as default locale



Package: hplip
Version: 1.6.10-3
Severity: normal
File: /usr/lib/hplip/base/g.py


When using hp-sendfax, I found these messages in the CUPS error log:

  D [] [Job 228] error: Unable to set locale.
  D [] [Job 228] Traceback (most recent call last):
  D [] [Job 228] File "/usr/lib/cups/backend/hpfax", line 60, in ?
  D [] [Job 228] from base.g import *
  D [] [Job 228] File "/usr/lib/hplip/base/g.py", line 136, in ?
  D [] [Job 228] locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
  D [] [Job 228] File "/usr/lib/python2.4/locale.py", line 381, in setlocale
  D [] [Job 228] return _setlocale(category, locale)
  D [] [Job 228] locale.Error: unsupported locale setting
  E [] PID 9206 (/usr/lib/cups/backend/hpfax) stopped with status 1!

Because of this error, hp-sendfax will not work...

I solved the problem thusly:

  --- /usr/lib/hplip/base/g.py.org  2007-07-28 13:49:09.000000000 -0700
  +++ /usr/lib/hplip/base/g.py      2007-07-28 13:49:45.000000000 -0700
  @@ -133,7 +133,7 @@
   except locale.Error:
       # TODO: Is this the right thing to do?
       log.error("Unable to set locale.")
  -    locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
  +    locale.setlocale(locale.LC_ALL, 'C')

Is it proper to assume the system has 'en_US.UTF-8'...?

Thanks!


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages hplip depends on:
ii  adduser                     3.102        Add and remove users and groups
ii  coreutils                   5.97-5.3     The GNU core utilities
ii  cupsys                      1.2.7-4      Common UNIX Printing System(tm) - 
ii  hplip-data                  1.6.10-3     HP Linux Printing and Imaging - da
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libcupsys2                  1.2.7-4      Common UNIX Printing System(tm) - 
ii  libgcc1                     1:4.1.1-21   GCC support library
ii  libsnmp9                    5.2.3-7      NET SNMP (Simple Network Managemen
ii  libssl0.9.8                 0.9.8c-4     SSL shared libraries
ii  libstdc++6                  4.1.1-21     The GNU Standard C++ Library v3
ii  libusb-0.1-4                2:0.1.12-5   userspace USB programming library
ii  lsb-base                    3.1-23.1     Linux Standard Base 3.1 init scrip
ii  python                      2.4.4-2      An interactive high-level object-o
ii  python-qt3                  3.16-1.2     Qt3 bindings for Python
ii  python-support              0.5.6        automated rebuilding support for p

Versions of packages hplip recommends:
ii  cupsys-client            1.2.7-4         Common UNIX Printing System(tm) - 
ii  hpijs                    2.6.10+1.6.10-3 HP Linux Printing and Imaging - gs
ii  hpijs-ppds               2.6.10+1.6.10-3 HP Linux Printing and Imaging - HP
pn  linuxprinting.org-ppds   <none>          (no description available)
pn  python-reportlab         <none>          (no description available)

-- no debconf information




Reply to: