pub fn encode_text_with(
text: &str,
encoding: &str,
opts: &MergeOptions,
) -> Result<Vec<u8>, Error>Expand description
encode_text with MergeOptions: with output_encoding UTF-8 the text is written as UTF-8 whatever the
original encoding was (a UTF-8 BOM is kept; a UTF-16 BOM or a legacy code page is not), the newline style of the
original is kept, and an XML, HTML or PO charset declaration that still names another charset is rewritten to
UTF-8, so the file says what it is.