Function charset::decode_ascii
source · Expand description
Converts ASCII to UTF-8 with non-ASCII bytes replaced with the REPLACEMENT CHARACTER.
This is can be used for strict MIME compliance when there is no declared encoding.
Borrows if input is ASCII-only. Performs a single heap allocation otherwise.