With .NET 4.6
I can determine the current code page with
System.Text.Encoding.Default
Now I'm trying to migrate a class library that reads files from the standard class library to a portable class library, supporting ASP.NET Core 5. Encoding.Default
not available in this configuration.
Of course, any last file must be saved in UTF-8
encoding, but I cannot guarantee that all files are stored in this encoding.
Is there any other way to get the default codepage?
I looked at the source source and found that Encoding.Default
implemented (more ore less) with a call to Win32 Api ...
source share