[packagekit] Unicode error with the yum backend

Tim Lauridsen tim.lauridsen at googlemail.com
Mon Feb 4 09:39:24 PST 2008


Tim Lauridsen wrote:
> Richard Hughes wrote:
>> On Mon, 2008-02-04 at 08:31 +0100, Tim Lauridsen wrote:
>>> [tim at deathstar ~]$ echo $LANG
>>> en_US.UTF-8
>> Ahh. The daemon runs in C locale:
>>
>> [hughsie at hughsie-laptop yum]$ export LANG=C    
>> [hughsie at hughsie-laptop yum]$ sudo ./resolve.py none ipw2100-firmware
>> allow-cancel    true
>> no-percentage-updates
>> status  query
>> error   internal-error  Error Type: <type
>> 'exceptions.UnicodeEncodeError'>;Error Value: 'ascii' codec can't encode
>> character u'\xae' in position 76: ordinal not in range(128);  
>>
>> I guess we have to switch the daemon to en_US.UTF-8 to get this stuff
>> back up the stack. Is this a sane idea?
>>
> I think it is the best way to go. But i am not an expert in these matters.
> 
> Tim
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit

I think i solved the issue in the yum backend.

i can now run in C locale without errors.

[tim at naboo helpers]$ sudo ./resolve.py none ipw2100-firmware
allow-cancel	true
no-percentage-updates
status	query
package	installed	ipw2100-firmware;1.3-8;noarch;installed	Firmware for 
Intel® PRO/Wireless 2100 network adaptors

[tim at naboo helpers]$ LANG=C sudo ./resolve.py none 
ipw2100-firmwareallow-cancel	true
no-percentage-updates
status	query
package	installed	ipw2100-firmware;1.3-8;noarch;installed	Firmware for 
Intel® PRO/Wireless 2100 network adaptors

Tim









More information about the PackageKit mailing list