Python 3 version, handles utf-8 strings. needs tag splitting, other adornments