Bug 192807 - s-c-p crashes if used with non-C locale
s-c-p crashes if used with non-C locale
Product: Fedora
Classification: Fedora
Component: system-config-printer (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
: i18n
Depends On:
Blocks: FC6Target
  Show dependency treegraph
Reported: 2006-05-23 06:26 EDT by Anton Guda
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 0.7.10-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-30 05:45:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Anton Guda 2006-05-23 06:26:41 EDT
Description of problem:
When system-config-printer called with non-C
locale, crash occurs, traceback is dumped.

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. LANG=ru_RU.KOI8-R system-config-printer
2.  or LANG=fr_FR.UTF-8 .. same result
3. LANG=C system-config-printer
Actual results:
Works only with C locale.

Expected results:
Works with any locale (may be set to 'C' internaly).

Additional info:

[atu@nt ~]$ LANG=ru_RU.KOI8-R system-config-printer
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 1931, 
in ?
  File "/usr/share/system-config-printer/system-config-printer.py", line 1922, 
in main
    mainwindow = GUI()
  File "/usr/share/system-config-printer/system-config-printer.py", line 42, 
in __init__
    self.language, self.encoding = locale.getlocale(locale.LC_ALL)
  File "/usr/lib/python2.4/locale.py", line 364, in getlocale
    raise TypeError, 'category LC_ALL is not supported'
TypeError: category LC_ALL is not supported
Comment 1 Tim Waugh 2006-05-25 08:21:01 EDT
Fixed in CVS.
Comment 2 Anton Guda 2006-05-26 11:31:28 EDT
Tested system-config-printer-0.7.9-1 :OK
Bug may be closed.

Comment 3 Tim Waugh 2006-05-26 11:53:03 EDT
The actual trigger is that one LC_... variable is different to another LC_...
variable.  In that case, trying to getlocale(LC_ALL) can't return a sensible answer.

0.7.9 is still afflicted with this; try:

LC_MESSAGES=fr_FR.UTF-8 LC_CTYPE=en_GB.UTF-8 system-config-printer

However, system-config-printer-0.7.10-1 should now handle this correctly.

Note You need to log in before you can comment on or make changes to this bug.