UTF-8 with BOM encoding was changed to UTF-8

Ran into a strange issue… upgraded my PS 7 install to 7.4.2. Had to restart the PSU service… and then endpoints.ps1 would be read, according to the logs, and then… nothing. Or it would sporadically load about half then just stop. I have seen something like this before in the past, but it is always the endpoints.ps1 file that gives us trouble.

I only modify it through the GUI so it isn’t me directly writing to it.

This time nothing worked… I even removed all code from the file, and PSU would then load. I add an endpoint in the GUI and the admin console would freeze on adding it even though it was added to the file.

So I copied our PT endpoints.ps1 to this box and restarted PSU and it loaded right away. Same routes, same everything… and then I noticed that the dev version was UTF-8 and the PT version was UTF-8 with BOM. And all other files in the repository folder was UTF-8 with BOM.

So I assume that the files need proper encoding. Has anyone run into this? endpoints was working perfectly before the reboot, could add and modify endpoints. Then on reboot the file had issues and appears to have then been converted to UTF-8? I am very confused how that would happen…

We do have Github integration, I dont recall in the last several months having to restore anything… as that might be the only thing that makes sense.

Thoughts?