Skip to content

Commit d34e408

Browse files
committed
Added default encoding loading for .NET Core
1 parent 668f42d commit d34e408

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Source/RtfDomParser/RTFDomDocument.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ namespace RtfDomParser
2525
/// </remarks>
2626
public partial class RTFDomDocument : RTFDomElement
2727
{
28+
static RTFDomDocument() => Defaults.LoadEncodings();
29+
2830
/// <summary>
2931
/// initialize instance
3032
/// </summary>

Source/RtfDomParser/RTFWriter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111

1212
using System;
13+
using System.Text;
1314

1415
namespace RtfDomParser
1516
{
@@ -48,6 +49,7 @@ internal static void TestClipboard()
4849
System.Windows.Forms.Clipboard.SetDataObject( data , true );
4950
System.Windows.Forms.MessageBox.Show("OK, you can paste words in MS Word.");
5051
}
52+
static RTFWriter() => Defaults.LoadEncodings();
5153

5254
/// <summary>
5355
/// Test to generate a little rtf document

0 commit comments

Comments
 (0)