Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=668282
Richard Hughes <rhughes(a)redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ffesti(a)redhat.com,
| |james.antill(a)redhat.com,
| |maxamillion(a)fedoraproject.o
| |rg, pmatilai(a)redhat.com,
| |skvidal(a)sethdot.org,
| |tla(a)rasmil.dk,
| |zpavlas(a)redhat.com
Component|PackageKit |yum
AssignedTo|rhughes(a)redhat.com |skvidal(a)sethdot.org
--- Comment #24 from Richard Hughes <rhughes(a)redhat.com> 2011-10-20 04:51:29 EDT
---
Okay, so there's something odd going on. In yumBackend.py we have (line 705):
name = grp.nameByLang(self.lang)
So it should mean we can return valid UTF8 by making it:
name = _to_unicode(grp.nameByLang(self.lang))
...like we do in so many other places. But alas, this seems not to work, and
packagekitd still emits lots of text 'Son et vid�o' was not valid UTF8! and
refuses (correctly) to pass this on to the clients.
So, if we debug this a little, we find that the clause:
if not isinstance(name, unicode)
...fails in _to_unicode(), so it basically looks like yum is sending us a
string that purports to be unicode, but contains invalid encoding.
We can't even do:
name = grp.nameByLang(self.lang)
name = unicode(name, 'utf-8', errors='replace')
As python (again, correctly) refuses to decode unicode like that.
To double check, if we do:
print name.decode('utf-8')
... we get "Error Value: 'ascii' codec can't encode character
u'\xe9' in
position 23: ordinal not in range(128)"
So, unless I'm misunderstanding something, or unless yum is emitting this as
valid unicode (but UCS-2 or UTF-16, which would be very odd) I think this is
probably a yum / python bug.
I'll reassign it for comments.
--
Configure bugmail:
https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.