pub fn decode_binary(s: &str) -> CowVec<u8>Expand description
Decodes a raw byte vector from a Unicode string. Code points in the range U+0080 to U+00FF are converted back to bytes 0x80 to 0xff. This allows using e.g. \xff in the input string literal, and getting back a 0xff byte in the byte vector. Otherwise, char(0xff) yields the UTF-8 bytes 0xc3bf, which is the U+00FF code point as UTF-8. These characters are effectively represented as ISO-8859-1 rather than UTF-8, but it allows precise use of the entire u8 value range.