Bug 508620 - unicode/ascii exception not caught, handled in yum
unicode/ascii exception not caught, handled in yum
Status: CLOSED DUPLICATE of bug 508360
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
11
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-29 02:51 EDT by Richard Schwarting
Modified: 2014-01-21 18:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-29 16:26:14 EDT
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 Richard Schwarting 2009-06-29 02:51:56 EDT
Description of problem:

When I do "yum whatprovides" in the German locale (LANG=de_DE), an exception is thrown and not caught.   This does not occur in the C or en_US locale.

Exception:
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)"

It appears to choke on A with an umlaut (Ä).  I suppose either that those need to be handled (despite not being on of the first 128 characters), or something else needs to be used in the locale's translation.


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

How reproducible:
Always.

Steps to Reproduce:
1. LANG=de_DE yum whatprovides /usr/bin/totem

  
Actual results:
| [richard@yojimbo ~]$ LANG=de_DE yum whatprovides /usr/bin/totem
| Geladene Plugins: dellsysidplugin2, presto, refresh-packagekit
| totem-2.26.2-1.fc11.i586 : Movie player for GNOME
| Repo        : fedora
| �bereinstimmung von:
| Dateiname     : /usr/bin/totem
|
|
|
| totem-2.26.2-1.fc11.i586 : Movie player for GNOME
| Repo        : installed
| �bereinstimmung von:
| Traceback (most recent call last):
|   File "/usr/bin/yum", line 29, in <module>
|     yummain.user_main(sys.argv[1:], exit_code=True)
|   File "/usr/share/yum-cli/yummain.py", line 309, in user_main
|     errcode = main(args)
|   File "/usr/share/yum-cli/yummain.py", line 178, in main
|     result, resultmsgs = base.doCommands()
|   File "/usr/share/yum-cli/cli.py", line 352, in doCommands
|     return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
|   File "/usr/share/yum-cli/yumcommands.py", line 560, in doCommand
|     return base.provides(extcmds)
|   File "/usr/share/yum-cli/cli.py", line 829, in provides
|     callback_has_matchfor=True)
|   File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2027, in searchPackageProvides
|     callback(po, tmpvalues, args)
|   File "/usr/share/yum-cli/output.py", line 870, in matchcallback_verbose
|     return self.matchcallback(po, values, matchfor, verbose=True)
|   File "/usr/share/yum-cli/output.py", line 864, in matchcallback
|     print self.fmtKeyValFill(key, item)
|   File "/usr/lib/python2.6/codecs.py", line 351, in write
|     data, consumed = self.encode(object, self.errors)
| UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)
| [richard@yojimbo ~]$


Expected results:
Something more like this, but in German:

| [richard@yojimbo ~]$ LANG=en_US yum whatprovides /usr/bin/totem
| Loaded plugins: dellsysidplugin2, presto, refresh-packagekit
| totem-2.26.2-1.fc11.i586 : Movie player for GNOME
| Repo        : fedora
| Matched from:
| Filename    : /usr/bin/totem
| 
| 
| 
| totem-2.26.2-1.fc11.i586 : Movie player for GNOME
| Repo        : installed
| Matched from:
| Other       : Provides-match: /usr/bin/totem
| 
| 
| 
| [richard@yojimbo ~]$ 


Additional info:

I don't recall this happening before relatively recently, since I regularly, occasionally use "whatprovides".

It seems to die on the translated version of the line "Other      : Provides-match: <path>"

The specific error,
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)"
indicates that it's choking on part of A with an umlaut (Ä) in UTF8 (which makes sense for German since its part of its alphabet):

From the character table in GNOME:
| Ä
|
| U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS
|
| Allgemeine Zeicheneigenschaften
|
| In Unicode enthalten seit: 1.1
| Unicode-Kategorie: Buchstabe, Großschrift
| Kanonische Zerlegung: U+0041 LATIN CAPITAL LETTER A + U+0308 COMBINING DIAERESIS
|
| Verschiedene, nützliche Darstellungsweisen
|
| UTF-8: 0xC3 0x84
| UTF-16: 0x00C4
|
| C-Oktal terminiertes UTF-8: \303\204
| Dezimale XML-Entität: &#196;
|
| Darstellungsweisen und Querverweise
|
| Äquivalente:
|  • U+0041 LATIN CAPITAL LETTER A U+0308 COMBINING DIAERESIS
Comment 1 seth vidal 2009-06-29 16:26:14 EDT

*** This bug has been marked as a duplicate of bug 508360 ***

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