# Python keeps bytes and text in two types, so the mistake is a TypeError at
# the join, before any wrong text exists.
data = b"caf\xc3\xa9"
text = "caf\N{LATIN SMALL LETTER E WITH ACUTE}"

try:
    data + text
except TypeError as e:
    print("  data + text                  ", f"{type(e).__name__}: {e}")
print("  data == text                 ", data == text)
print("  data.decode('utf-8') == text ", data.decode("utf-8") == text)
