erdomke / RtfPipe

Library for processing rich-text format (RTF) streams
MIT License
121 stars 44 forks source link

Encoding for "Windows-1252" not working in .NET Core #5

Closed stefansolid closed 6 years ago

stefansolid commented 6 years ago

In a ASP.NET Core application the encoding for windows was not found, the line below failed:

public static readonly Encoding AnsiEncoding = Encoding.GetEncoding("Windows-1252");

I downloaded the master branch, in which this was fixed according to issue history. However, I did not get it working correctly. But if I did this it worked just fine:

  1. Add nuget packet System.Text.Encoding.CodePages
  2. Change the line above to:

public static readonly Encoding AnsiEncoding = CodePagesEncodingProvider.Instance.GetEncoding(1252);

If not issue or if I did misbehave close issue as you see fit :)

thimens commented 6 years ago

From this link, it's not an issue

erdomke commented 6 years ago

This is now clarified in the Readme.md to help future individuals. Sorry for the slow response.