mehcode / config-rs

⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Apache License 2.0
2.43k stars 206 forks source link

Added BOM sniffing check to file load #565

Open AngelOnFira opened 1 month ago

AngelOnFira commented 1 month ago

On Windows, config files will run into an error loading due to a Byte-order mark that may appear at the start. I don't understand this fully, but we would run into an issue from it below:

image

Where a file would load just fine on Mac/Linux, but show this on Windows. This fix will detect this zero-width mark, and properly skip it.