def any2unicode(text, encoding='utf8', errors='strict'):
 if isinstance(text, unicode):
  return text
 return unicode(text, encoding, errors=errors)

def any2unicode ( text , encoding = 'utf8' , errors = 'strict' ) : if isinstance ( text , unicode ) : return text return unicode ( text , encoding , errors = errors )
convert a string .