#[no_mangle]
pub unsafe extern "C" fn encoding_new_decoder_without_bom_handling(
    encoding: *const Encoding
) -> *mut Decoder
Expand description

Allocates a new Decoder for the given Encoding on the heap with BOM handling disabled and returns a pointer to the newly-allocated Decoder.

If the input starts with bytes that look like a BOM, those bytes are not treated as a BOM. (Hence, the decoder never morphs into a decoder for another encoding.)

Note: If the caller has performed BOM sniffing on its own but has not removed the BOM, the caller should use encoding_new_decoder_with_bom_removal() instead of this function to cause the BOM to be removed.

Once the allocated Decoder is no longer needed, the caller MUST deallocate it by passing the pointer returned by this function to decoder_free().

Undefined behavior

UB ensues if the argument is NULL.