Home > Articles > Details

'Windows-1252' is not a supported encoding name. For information on defining a custom encoding see the documentation for the Encoding.RegisterProvider method


Question: How do you resolve:
  Message='Windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. (Parameter 'name')
  Source=System.Private.CoreLib
 

Login to See the Rest of the Answer

Answer:
If you are using Asp.Net 6 or Asp.Net 5 add Encoding.RegisterProvider(CodePagesEncodingProvier.Instance) in the Startup.cs after installing System.Text.Encoding and System.Text.Encoding.Pages in the Main Application (Do not install these libraries in other In project class library project otherwise it won't work).

 

Leave a comment if this helped you or if you have any suggestions.


If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.


© 2022 - ErnesTech - Privacy