Print a warning and use default encoding if the code page doesn't exist

This commit is contained in:
de4dot 2012-07-23 13:06:49 +02:00
parent 8a81e98b3f
commit c8477bdbce

View File

@ -146,7 +146,8 @@ namespace de4dot.code.deobfuscators.MaxtoCode {
return Encoding.GetEncoding(cp);
}
catch {
throw new UserException(string.Format("Code page {0} doesn't exist", cp));
Log.w("Invalid code page {0}!", cp);
return Encoding.Default;
}
}