equery command do not like to print unicode characters. Reproducible: Always Steps to Reproduce: 1. equery files media-tv/linuxtv-dvb-apps Actual Results: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 28: ordinal not in range(128) Expected Results: it should show all the filenames. i changed something to fix it: /usr/lib64/python2.6/site-packages/gentoolkit/pprinter.py in def print_info(lv, s, line_break = True): old: sys.stdout.write(s) new: s2 = unicode(s) s3=s2.encode( "utf-8" ) sys.stdout.write(s3) i do not know if it is the correct way to handle unicode without side effects.
the filename with the non-asci character: /usr/share/dvb/dvb-t/fr-Alençon
Thanks for reporting this bug. I believe this bug has been (inadvertently) fixed in my svn repo (should be in the portage tree in a few weeks). $ equery f linuxtv-dvb-apps |grep fr-Alen /usr/share/dvb/dvb-t/fr-Alen��on It doesn't traceback, but I'm not sure if the squares are a result of my terminal settings or equery internals. If you'd like to test for yourself: $ svn co http://genscripts.googlecode.com/svn/trunk/gentoolkit $ export PYTHONPATH="$(pwd)/gentoolkit/pym:${PYTHONPATH}" $ export PATH="$(pwd)/gentoolkit/bin:${PATH}" $ equery f linuxtv-dvb-apps Thanks.
I tried your commands yesterday, it works here. the output of /usr/share/dvb/dvb-t/fr-Alençon was correct. i use "LANG=de_DE.UTF-8" locale and x11-terms/rxvt-unicode. It shows me all unicode character. But i had to install a lot of font packages too.
Released in gentoolkit-0.3.0_rc8