'Decode element to unicode if necessary.'

def _decode_element(self, line):

    if (not self.encoding):
        return line
    if (isinstance(line, str) and self.default_encoding):
        return line.decode(self.default_encoding)
    return line
