Where is the encoding format stored for a .tex file? I had my editor set to latin1 by mistake when I created my file and I had to resort to
% !TEX encoding = UTF-8 Unicode
in the preamble to force UTF-8. I think the file still is encoded in latin1 and this modeline makes the editor ignore the actual encoding and force it to UTF-8.