Isomorphisms for converting between text and bytestrings