'Renders the contents of this tag as a string in the given
encoding. If encoding is None, returns a Unicode string..'

def decodeContents(self, prettyPrint=False, indentLevel=0, eventualEncoding=DEFAULT_OUTPUT_ENCODING):

    s = []
    for c in self:
        text = None
        if isinstance(c, NavigableString):
            text = c.decodeGivenEventualEncoding(eventualEncoding)
        elif isinstance(c, Tag):
            s.append(c.decode(prettyPrint, indentLevel, eventualEncoding))
        if (text and prettyPrint):
            text = text.strip()
        if text:
            if prettyPrint:
                s.append(('    ' * (indentLevel - 1)))
            s.append(text)
            if prettyPrint:
                s.append('\n')
    return ''.join(s)
