Skip to main content

convert_to_encoding

Function convert_to_encoding 

Source
pub fn convert_to_encoding(
    utf8_bytes: &[u8],
    target_encoding: Encoding,
) -> Vec<u8> 
Expand description

Convert UTF-8 content to the specified encoding for saving.

Does NOT add BOM — BOM handling lives in the write-recipe path.