.env parsing error on Windows server Has anyone had issues with Craft parsing a .env on Windows Server?   Dotenv is throwing an exception (FileException - invalid name) when parsing the first line of my .env, which is just a comment. I can remove that line and then i complains about the next line.
My .env simple starts with:
# The environment Craft is currently running in (dev, staging, production, etc.)
ENVIRONMENT=dev

basically, Dotenv/Parser/isValidName's Regex call is failing.
Full Stack...
Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file due to an invalid name. Failed at [ENVIRONMENT]. in C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Parser.php:74 

Stack trace: 
#0 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Parser.php(30): Dotenv\Parser::parseName() 

#1 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Loader.php(169): Dotenv\Parser::parse()

#2 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Loader.php(107): Dotenv\Loader-&gt;processEntries()

#3 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Loader.php(91): Dotenv\Loader-&gt;loadDirect()

#4 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Dotenv.php(123): Dotenv\Loader-&gt;load()

#5 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Dotenv.php(80): Dotenv\Dotenv-&gt;loadData()

#6 in C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Parser.php on line 74
Turns out it WAS a file encoding issue. It was UTF BOM (?), and had a weird hidden character right at the beginning of the file. I was able to open the file up in Notepad++ (Thanks Brad) and was able to convert the file to &quot;normal&quot; UTF8.