use BStr;
use Encoding;
use ExnMessageResult;
/// Try to produce a new `Encoding` for `label` or report an error if it is not known.
///
/// ### Deviation
///
/// * There is no special handling of UTF-16LE/BE with checks if data contains a BOM or not, like `git` as we don't expect to have
/// data available here.
/// * Special `-BOM` suffixed versions of `UTF-16` encodings are not supported.