the other cause of the error at line 1 is an issue if the Unicode BOM signature is included in the page.
Go to Modify -> Page Properties
Select the Title and Encoding section.
make sure the Include Unicode Signature (BOM) option is not checked.
You may also need to open the file in an external text editor and select Save As and change the encoding to Western ISO 1