[Yum-devel] Unicode + default encodings

Jeremy Redburn jredburn at gmail.com
Tue Aug 16 16:36:34 UTC 2005


Hello there,

I'm trying to build what essentially amounts to an XML-RPC interface
to Yum and am struggling with various string encodings. Specifically,
some of the description fields in my packages contain special
characters (copyright, trademark, newlines, etc). I've tried a number
of ways of retrieving the description and outputting it, but I have
yet to be able to duplicate the output of a simple 'yum info'.
Specifically, the installed package 'cups' in my repository looks like
this:

 The Common UNIX Printing System provides a portable printing layer for
UNIX(R) operating systems. It has been developed by Easy Software Products
to promote a standard printing solution for all UNIX vendors and users.
CUPS provides the System V and Berkeley command-line interfaces.

My code to retrieve the description is similar to that in output.py:

print pkg.returnSimple('description')

My output looks like this:

 The Common UNIX Printing System provides a portable printing layer for
UNIX� operating systems. It has been developed by Easy Software Products
to promote a standard printing solution for all UNIX vendors and users.
CUPS provides the System V and Berkeley command-line interfaces.

I've tried a number of encodings / decodings, but have not been able
to duplicate the output of the yum command line. If anyone has any
recommendations or pointers they'd be greatly appreciated.

I'm awfully new to Unicode and am still trying to make sure I've got
all the concepts down, so if I sound awfully naive anywhere I
apologize.

Thanks much,
Jeremy



More information about the Yum-devel mailing list