Previously, calling unicode() on a tag with non-ascii characters would
result in a UnicodeDecodeError.
With this commit, there is still some implicit str-to-unicode conversion
going on during rendering because literals are in str rather than
unicode, but unlike render(), there's no mandatory utf-8 encoding and we
keep our unicode values unencoded.
This allows us, for example, to directly supply PyHTML tag to Django templates without having to explicitly call tag.render().decode('utf-8')
Previously, calling unicode() on a tag with non-ascii characters would result in a UnicodeDecodeError.
With this commit, there is still some implicit str-to-unicode conversion going on during rendering because literals are in str rather than unicode, but unlike render(), there's no mandatory utf-8 encoding and we keep our unicode values unencoded.
This allows us, for example, to directly supply PyHTML tag to Django templates without having to explicitly call tag.render().decode('utf-8')