[PyKDE] Unicode list and ComboBox.insertStrList()

Timothy Grant timothy.grant at gmail.com
Mon Feb 28 22:19:41 GMT 2005


I'm trying to populate a ComboBox with a list of strings that *may*
contain odd unicode characters.

insertStrList is trying to do an ascii unicode conversion on each item
in the list and can't. I'd like to set the conversion type to replace,
but don't know how. Should I simply preprocess the list with the
correct conversion/error correction and then use the preprocessed
list?

self.insertStrList([ item for item in
music_library.__dict__[name].keys() if item ])
UnicodeEncodeError: 'ascii' codec can't encode character '\uf1' in
position 4: ordinal not in range(128)

Thanks for your help.

-- 
Stand Fast,
    tjg.




More information about the PyQt mailing list