var text = File.ReadAllText(file, Encoding.GetEncoding(codePage)); List of codepages : https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers?redirectedfrom=MSDN