# Canonicalize(), though it claims to, does not encode unicode
# nodes to UTF-8 properly and throws an exception unless you write
# the stream to a file object, so just encode it ourselves.
# Canonicalize(), though it claims to, does not encode unicode
# nodes to UTF-8 properly and throws an exception unless you write
# the stream to a file object, so just encode it ourselves.