Make GetDecoder use GetEncoding for forced

This commit is contained in:
Adam Hathcock
2018-05-14 16:20:57 +01:00
parent be971cb6f7
commit 473f5d8189

View File

@@ -76,7 +76,7 @@ namespace SharpCompress.Common
public Func<byte[], int, int, string> GetDecoder()
{
return CustomDecoder ?? ((bytes, index, count) => (Default ?? Encoding.UTF8).GetString(bytes, index, count));
return CustomDecoder ?? ((bytes, index, count) => GetEncoding().GetString(bytes, index, count));
}
}
}