EDIT : Warning, solution below will work only if there is an accentuated caracter in first line.
Wrong encoding format file is a reccurent issue, especially when working on Windows.
If you don’t want to impose to end used an encoding format for text files, you can use the code below.