(Encodings): added WithFatalFallback static method.

This commit is contained in:
morkt 2014-07-29 06:54:46 +04:00
parent 5696fad710
commit 32f3dd134f

View File

@ -34,6 +34,13 @@ namespace GameRes
public static class Encodings
{
public static readonly Encoding cp932 = Encoding.GetEncoding (932);
public static Encoding WithFatalFallback (Encoding enc)
{
enc = enc.Clone() as Encoding;
enc.EncoderFallback = EncoderFallback.ExceptionFallback;
return enc;
}
}
public static class StreamExtension