Bug 172155 - popt: makes gettext.dgettext() bail in certain locales
popt: makes gettext.dgettext() bail in certain locales
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-31 17:15 EST by Zack Cerza
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-06 07:43:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zack Cerza 2005-10-31 17:15:58 EST
Description of problem:
popt causes python to spit out a traceback when gettext.dgettext() is called on
its domain for any value in certain locales.

Version-Release number of selected component (if applicable):
popt-1.10.1-22.x86_64
popt-1.10.1-22.i386

How reproducible:
Always, with python. Other languages were not attempted.

Steps to Reproduce:
% LANG=ja_JP.UTF-8 python -c "import gettext; gettext.dgettext('popt', 'foo')"

Try the same with es_ES(.UTF-8), zh_CN(.UTF-8), and others. It works with
fr_FR(.UTF-8) and en_US(.UTF-8).
  
Actual results:
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/lib64/python2.4/gettext.py", line 517, in dgettext
    codeset=_localecodesets.get(domain))
  File "/usr/lib64/python2.4/gettext.py", line 465, in translation
    t = _translations.setdefault(key, class_(open(mofile, 'rb')))
  File "/usr/lib64/python2.4/gettext.py", line 177, in __init__
    self._parse(fp)
  File "/usr/lib64/python2.4/gettext.py", line 324, in _parse
    tmsg = unicode(tmsg, self._charset)
LookupError: unknown encoding: CHARSET

Expected results:
command returns 0.
Comment 1 Dave Malcolm 2005-10-31 17:37:39 EST
Also seen on rawhide with popt-1.10.2-6
Comment 2 Zack Cerza 2005-11-30 13:50:21 EST
Paul, I see you put the bug in MODIFIED, but there's no popt update yet. Coming
soon?
Comment 4 Jeff Johnson 2005-12-22 00:46:50 EST
FIxed in rpm-4.4.4.

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