#NEWLINE# def to_unicode( text , encoding = 'utf8' , errors = 'strict' ) : #NEWLINE# #INDENT# 'Convert a string (bytestring in `encoding` or unicode), to unicode.' #NEWLINE# if isinstance ( text , unicode ) : #NEWLINE# #INDENT# return encoding #NEWLINE# #UNINDENT# return unicode ( text , encoding , errors = errors )