mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(Encodings): added WithFatalFallback static method.
This commit is contained in:
@@ -34,6 +34,13 @@ namespace GameRes
|
|||||||
public static class Encodings
|
public static class Encodings
|
||||||
{
|
{
|
||||||
public static readonly Encoding cp932 = Encoding.GetEncoding (932);
|
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
|
public static class StreamExtension
|
||||||
|
|||||||
Reference in New Issue
Block a user