Bug 172155

Summary: popt: makes gettext.dgettext() bail in certain locales
Product: [Fedora] Fedora Reporter: Zack Cerza <zcerza>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-06 12:43:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zack Cerza 2005-10-31 22:15:58 UTC
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 22:37:39 UTC
Also seen on rawhide with popt-1.10.2-6


Comment 2 Zack Cerza 2005-11-30 18:50:21 UTC
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 05:46:50 UTC
FIxed in rpm-4.4.4.