public override int GetCharCount(byte[] bytes, int index, int count)
{
int result;
try
{
result = defaultEncoding.GetDecoder().GetCharCount(bytes, index, count, true);
}
catch (DecoderFallbackException)
{
result = isoEncoding.GetDecoder().GetCharCount(bytes, index, count, true);
}
return(result);
}