Preserve legacy code-page encodings on .NET Core
ProprietaryRoutes legacy code-page requests through a private helper that tries Encoding.GetEncoding first, then CodePagesEncodingProvider if the encoding is unavailable. Keeps registered providers in precedence and does not change global provider registration. Targets .NET Core 3.0 and later, whose reference packs include the provider. Handles dynamic names/numbers and explicit encoder/decoder fallbacks. Exceptions originating in custom providers are preserved. Leaves native literal encodings, partial types, conditional-compilation files, named arguments, and unresolved calls unchanged.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseCodePagesEncodingFallbackmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net3_0. UseCodePagesEncodingFallbackInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.