def _to_unicode(self, data, encoding, errors='<STR_LIT:strict>'):
<EOL>if (len(data) >= <NUM_LIT:4>) and (data[:<NUM_LIT:2>] == '<STR_LIT>') and (data[<NUM_LIT:2>:<NUM_LIT:4>] != '<STR_LIT>'):<EOL><INDENT>encoding = '<STR_LIT>'<EOL>data = data[<NUM_LIT:2>:]<EOL><DEDENT>elif (len(data) >= <NUM_LIT:4>) and (data[:<NUM_LIT:2>] == '<STR_LIT>') and (data[<NUM_LIT:2>:<NUM_LIT:4>] != '<STR_LIT>'):<EOL><INDENT>encoding = '<STR_LIT>'<EOL>data = data[<NUM_LIT:2>:]<EOL><DEDENT>elif data[:<NUM_LIT:3>] == '<STR_LIT>':<EOL><INDENT>encoding = '<STR_LIT:utf-8>'<EOL>data = data[<NUM_LIT:3>:]<EOL><DEDENT>elif data[:<NUM_LIT:4>] == '<STR_LIT>':<EOL><INDENT>encoding = '<STR_LIT>'<EOL>data = data[<NUM_LIT:4>:]<EOL><DEDENT>elif data[:<NUM_LIT:4>] == '<STR_LIT>':<EOL><INDENT>encoding = '<STR_LIT>'<EOL>data = data[<NUM_LIT:4>:]<EOL><DEDENT>newdata = unicode(data, encoding, errors)<EOL>return newdata<EOL>
Given a string and its encoding, decodes the string into Unicode.
    %encoding is a string recognized by encodings.aliases