refactored SearchExpression

This commit is contained in:
2026-09-15 13:18:09 +02:00
parent 1d53f6930a
commit 5b1b8f4ce5
21 changed files with 509 additions and 216 deletions
+19
View File
@@ -0,0 +1,19 @@
namespace ParadoxSaveParser.Lib;
/// <summary>
/// Encodings used by Paradox save files.
/// Touching this class registers the code page provider, so no consumer has to do it.
/// </summary>
public static class ParadoxEncodings
{
/// <summary>Encoding of EU4 save files.</summary>
public static Encoding Windows1252 { get; }
static ParadoxEncodings()
{
// .NET ships only ASCII, Latin1 and the Unicode encodings; code pages come from this provider
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
// assigned here and not in an initializer, which would run before the provider is registered
Windows1252 = Encoding.GetEncoding(1252);
}
}