Constant stringsext::finding::OUTPUT_BUF_LEN [−][src]
pub const OUTPUT_BUF_LEN: usize = 0x9192;
Expand description
OUTPUT_BUF_LEN
needs to be long enough to hold all findings that are
decoded to UTF-8 in scan::scan()
. To estimate the space needed to receive
all decodings in UTF-8, the worst case - Asian like EUC_JP
- has to be
taken into consideration: Therefor, in order to avoid output buffer overflow,
OUTPUT_BUF_LEN
should be at least twice as big as INPUT_BUF_LEN
. You can
also check the minimum length with
Decoder::max_utf8_buffer_length_without_replacement
. Unfortunately this can
not be done programmatically, because output_buffer
is a statically
allocated array.