Fix unicode error

Formatting a byte string with unicode values implicitly attempts to encode the values with the default encoding (ascii). This will fail if a value contains a non-ascii character, but not otherwise.