'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
 

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.


Edit this Article
Question 'Windows-1252' is not a supported encoding name Questions published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

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

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy