|0.1.0||Feb 4, 2023|
#1483 in Encoding
Lossless conversion between UTF-8 and bytes in Rust. Optimized for UTF-8 content.
Non-UTF-8 bytes (>= 128) are encoded in a subset of Unicode Private Use Area
U+EFFF. Conflicted Unicode characters are escaped by prefixing
This can be useful to pass mostly UTF-8 but occasionally invalid UTF-8 data as text-only format like JSON for processing, after receiving the processed text back, reconstruct the original data losslessly.
ef80escape is chosen because it's similar to Python's
surrogateescape but instead of surrogates, it uses a different range starting with
Refer to the documentation for examples.