I have several input text files, each of them has different encoding used - UTF8, UCS2 LE BOM etc.
The content of those files is read using byte [] fileBytes = File.ReadAllBytes(filepath);
method and stored as byte array.
I need to restore the original text content of these files, but I don't know how to determine the source encoding for each of those?