When listing packages, encode the output as UTF-8 before printing

Fixes https://bugzilla.redhat.com/1163070