Bug 172155 - popt: makes gettext.dgettext() bail in certain locales
Summary: popt: makes gettext.dgettext() bail in certain locales
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-31 22:15 UTC by Zack Cerza
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-06 12:43:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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