populate client listing into list names.append( name ) names.append( '' ) names.sort() names = tuple( [s.encode('utf8') for s in names] )When i try the above to utf8 names i receive this error:
TypeError: sequence item 0: expected str instance, bytes found
Why does it says its bytes instead of being a string? How to correct it?
I'am using python 3 and if i try to print names i get:
Quote:['', 'Alexander Lepsveridze', 'John Comeau', '\xce\x86\xce\xba\xce\xb7\xcf\x82 \xce\xa4\xcf\x83\xce\xb9\xce\xac\xce\xbc\xce\xb7\xcf\x82', '\xce\x8c\xce\xbc\xce\xb9\xce\xbb\xce\xbf\xcf\x82 \xce\xa4\xcf\x83\xce\xbf\xcf\x84\xcf\x85\xce\xbb\xce\xaf\xce\xbf\xcf\x85'
What are these '\xce'? Bytestrings? What i excpected was Greek letter names there because the list was filled initially with Greek names.