namespace ParadoxSaveParser.Lib;
///
/// Encodings used by Paradox save files.
/// Touching this class registers the code page provider, so no consumer has to do it.
///
public static class ParadoxEncodings
{
/// Encoding of EU4 save files.
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);
}
}