config-rs icon indicating copy to clipboard operation
config-rs copied to clipboard

Added BOM sniffing check to file load

Open AngelOnFira opened this issue 1 year ago • 2 comments

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.

AngelOnFira avatar May 25 '24 03:05 AngelOnFira

We have run into the same issue with reading UTF-8 files with BOM in our product too.

Seems like this PR would fix it in a decent way. Is there any reason it hasn't been merged yet. If there is another way the maintainers would like to handle this issue, I could look into doing that work.

ldemidov avatar Feb 20 '25 20:02 ldemidov

I'm not actively maintaining here atm, but when the PR was raised the project had no active maintainers (it does now since the move to rust-cli org.

The author probably just needs to rebase the work and so long as there aren't any concerns in review, it'll likely get merged 👍

polarathene avatar Feb 20 '25 21:02 polarathene