Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<BaseOutputPath>$(RootDir)bin\$(Configuration)</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>618;429;219;1717;162;414</WarningsNotAsErrors>
<WarningsNotAsErrors>618;429;219;1717;162;414;NU1900;CA1859;CA1861</WarningsNotAsErrors>
<NoWarn>1591;1584;1574;1685;1573</NoWarn>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython/IronPython.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' != 'net45' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" />
</ItemGroup>

Expand Down
9 changes: 9 additions & 0 deletions Src/IronPython/Runtime/PythonContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ namespace IronPython.Runtime
public delegate int HashDelegate(object o, ref HashDelegate dlg);

public sealed partial class PythonContext : LanguageContext {
static PythonContext() {
try {
#if NETCOREAPP || NETSTANDARD
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
#endif
} catch {
}
}

internal static readonly string/*!*/ IronPythonDisplayName = CurrentVersion.DisplayName;
internal const string/*!*/ IronPythonNames = "IronPython;Python;py";
internal const string/*!*/ IronPythonFileExtensions = ".py";
Expand Down