In my case the encoding was set to "UTF-16 BE BOM" on the actual script file. I used notepad++ to change to UTF-8-BOM (similar to other scripts)