I'm processing a large data file in HTML format using Python's BeautifulSoup. And I'm getting NavigableStrings which I need to unicode encode before printing out. If I take either the get_text() or .string from the NavigableString, it seems to strip out all the HTML tags from it. On the other hand, NavigableString itself doesn't seem to have a .encode("utf-8") type option. So how can I turn my NavigableString into an ordinary string without stripping the tags? Continue reading...