How to remove this Byte Order Mark from Saratoga Template.

well, I finally decided to ask this here after trying so many times to remove this.
I googled and learned this is Byte Order Mark.
Something to do with saving your file in the wrong format.
It is producing these 3 signs and as a result a white bar at the top of my website. (See image attached)
Signs are not always there, the white bar is.
I cannot find out what file this is causing.
I have changed many files back to original knowing I edited those. But no luck. #-o

My Site

Anyone knows where to look for?
TIA


When inspectng the html of your page, one can see that these characters are inserted here

<div id="page"><!-- page wrapper -->



<!-- header -->

Those two comments come from header.php where these lines default look like this

<div id="page"><!-- page wrapper -->
<!-- header -->

Your header.php looks like this

<div id="page"><!-- page wrapper -->

<?php include ('./EUwarning/wrnWarningv3.php');
 #echo $wrnHead; // if you want the yellow box with your message 

 #echo  $wrnStrings // if you want the warnings before anything else remove the # 
?>


<!-- header -->

First remove all those lines and test again.
If the BOM characters disappear check the warning script.

IMPORTANT: Most modern scripts are in UTF-8.
You should never ever use notepad.exe of ms-word to edit your scripts.
Always use the free program editor notepad++ (for windows) or BB-edit on a Mac

If the wrnWarningv3.php script is causing this, open the file in notepad++ and when saving make sure it read UTF-8 w/o BOM, as in the screenshot,

Wim


WIth the Saratoga templates, you should NOT use UTF-8 when editing any of the files. The template scripts are all in ISO-8859-n (not UTF-8). All my scripts can produce UTF-8 output, but by default use ISO-8859-n when running in the Saratoga template.

https://saratoga-weather.org/wxtemplates/template-FAQ.php#FAQ2

  1. Fully correct, no problem with BOM. For all Saratoga scripts.

  2. But he is using my eu-warning scripts, and as all of my scripts, they are fully UTF-8.
    The user should be careful editing those.

  3. His web-server is also UTF-8
    Request URL: Weerstation Westland - De Poel - Home
    Response headers:
    Content-Type: text/html; charset=UTF-8
    Date: Mon, 08 Jul 2019 14:30:26 GMT

Using notepad++ one can never insert BOM by accident as the script-editor does not insert those characters. Only word-processing programs such as notepad.exe and MS-Word do that.

Wim

Ok thanks, I will have a look at that.

Wim, you refer to notepad.exe of ms-word.
Do you mean wordpad.exe
I thought it was ok to use notepad but not wordpad.
I recently installed notepad++.

That was true with older versions of notepad, but later versions are more “sophisticated” :roll:

Fixed. :smiley:

“If the wrnWarningv3.php script is causing this, open the file in notepad++ and when saving make sure it read UTF-8 w/o BOM, as in the screenshot,”

The file said UTF-8 BOM when loaded in notepad++
I am using dutch lanquage, under Karakterset, I choose UTF-8 (Zonder BOM)
Then Saved.

Thanks.