diff --git a/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj b/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj
index 4445d2a5..be83c5ba 100644
--- a/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj
+++ b/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj
@@ -876,7 +876,7 @@
PreserveNewest
-
+
PreserveNewest
diff --git a/XmlSchemaClassGenerator.Tests/xsd/simple/windows1250.xsd b/XmlSchemaClassGenerator.Tests/xsd/simple/windows1250.xsd
new file mode 100644
index 00000000..5845eec3
--- /dev/null
+++ b/XmlSchemaClassGenerator.Tests/xsd/simple/windows1250.xsd
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/XmlSchemaClassGenerator/Generator.cs b/XmlSchemaClassGenerator/Generator.cs
index c6b4aaeb..9ac725f2 100644
--- a/XmlSchemaClassGenerator/Generator.cs
+++ b/XmlSchemaClassGenerator/Generator.cs
@@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+using System.Text;
using System.Xml;
using System.Xml.Schema;
@@ -258,6 +259,11 @@ public bool SeparateSubstitutes
set { _configuration.SeparateSubstitutes = value; }
}
+ static Generator()
+ {
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+ }
+
public void Generate(IEnumerable files)
{
var set = new XmlSchemaSet();
diff --git a/XmlSchemaClassGenerator/XmlSchemaClassGenerator.csproj b/XmlSchemaClassGenerator/XmlSchemaClassGenerator.csproj
index 96bcd1e1..108de0c8 100644
--- a/XmlSchemaClassGenerator/XmlSchemaClassGenerator.csproj
+++ b/XmlSchemaClassGenerator/XmlSchemaClassGenerator.csproj
@@ -28,6 +28,10 @@
snupkg
+
+ $(DefineConstants);NETSTANDARD
+
+
@@ -37,19 +41,16 @@
-
-
- $(DefineConstants);NETSTANDARD
-
-
+
+