I've seen in other questions(like How can I detect the encoding/codepage of a text file) that it is impossible to identify a file's encoding.
I've also found a function that identifies encoding (Determine a string's encoding in C#) but its heuristic and depends on file contents.
I wondered if I included a certain string at the beginning of each file it would allow to uniquely identify its encoding, due to different byte-char mappings.
If its not possible for all encodings, it should be good enough to identify the most common ones (http://w3techs.com/technologies/overview/character_encoding/all)