pub fn encode_wtf8_from_scalars(codepoints: &[u32]) -> Result<Vec<u8>>Expand description
More concise encode_wtf8 using ucs2decode/encode_wtf8_single logic.
Encodes a slice of Unicode scalar codepoints to WTF-8 bytes.
Surrogate pairs are combined and encoded as a single codepoint.
Unpaired surrogates are encoded as 3-byte WTF-8 sequences.
Values higher than 0x10FFFF are not supported.