[Yum-devel] Unicode Decode Error with yum info

James Antill james.antill at redhat.com
Sun Mar 16 02:28:34 UTC 2008


On Sun, 2008-03-16 at 05:23 +0530, Kulbir Saini wrote:
> Hi all!
> 
> 	We were not checking for possible errors while converting to utf-8. I 
> have attached a patch for the same. The patch was generated using 'git 
> diff'.
> 	This is my first patch. Hope I generated it the right way :)

 Yeh, however:

1. At the very least it should only be catching "UnicodeDecodeError".

2. That unicode() call was put there because otherwise
pkg.summary/pkg.description for libselinux caused problems in de_DE
(among other locale problems -- as ® wasn't valid for non-unicode).

 ® also looks like it's the problem for you. So what locale do you have
(please post output of the locale command)?

 Maybe we can also work around it by only calling unicode() if we get
"translated data" from gettext.dgettext() ... as I assume whatever
locale you have doesn't have a translation.
 I'm loath to have so many edge cases everywhere we want to output
locale translated pkg.summary/description.

-- 
James Antill <james.antill at redhat.com>
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080315/659ed9ae/attachment.pgp 


More information about the Yum-devel mailing list