connection: Break out bytes->str decoding into a function and have it fall back to Latin-1