Encoding support for byte strings