How to convert characters to iso-8859-1

  • KM02606061
  • 28-Oct-2016
  • 28-Oct-2016

Summary

How to convert characters to iso-8859-1

Question

Charset iso-8859-1

Answer

This is a C# built-in function to convert characters to iso-8859-1

The following reference is needed.

using System.Text;

We have to use Encoding.GetEncoding method like following code:

var reader = new StreamReader(File.OpenRead(@"C:\Temp\Erros.csv"), Encoding.GetEncoding("iso-8859-1"));

Without encoding

 image text

 

With Encoding

image text