mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 13:45:34 +08:00
(Encodings.WithFatalFallback): turned into Encoding extension method.
This commit is contained in:
parent
4561157854
commit
6330309552
@ -35,11 +35,11 @@ namespace GameRes
|
||||
{
|
||||
public static readonly Encoding cp932 = Encoding.GetEncoding (932);
|
||||
|
||||
public static Encoding WithFatalFallback (Encoding enc)
|
||||
public static Encoding WithFatalFallback (this Encoding enc)
|
||||
{
|
||||
enc = enc.Clone() as Encoding;
|
||||
enc.EncoderFallback = EncoderFallback.ExceptionFallback;
|
||||
return enc;
|
||||
var encoding = enc.Clone() as Encoding;
|
||||
encoding.EncoderFallback = EncoderFallback.ExceptionFallback;
|
||||
return encoding;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user