Hello !
I don't know what is the best way to do that.
But this piece of code works well for me:
assert isinstance(source, str) # 'source' has to be a str
try:
good_utf8=source.decode('utf8')
except ValueError: # source is not utf8-coded
good_utf8=source.decode('iso8859-1') # Fallba
Hi guys!
I want to know suggestion on how to convert a string to unicode... The
gtk requires unicode strings on the widgets, now either I define the
string as u'some string' or I define an attribute enconding
(self.enc='iso8859-1') and for each string I use unicode(string,
self.enc)... To access t