Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support UTF-8 BOM encoding #27

Closed
allan2 opened this issue Oct 16, 2022 · 2 comments
Closed

Support UTF-8 BOM encoding #27

allan2 opened this issue Oct 16, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@allan2
Copy link
Owner

allan2 commented Oct 16, 2022

Trying to load a .env file with a BOM (\ufeff) will not parse correctly.
The BOM should be ignored when parsing.

Relevant #26

@allan2 allan2 added the good first issue Good for newcomers label Oct 16, 2022
@sonro
Copy link
Collaborator

sonro commented Oct 17, 2022

I would like to tackle this.

It seems like the best place to check for a BOM is in Iter::load. This is just before the file is read into the BufReader. Would that be acceptable?

@allan2
Copy link
Owner Author

allan2 commented Oct 17, 2022

That sounds great!

sonro added a commit to sonro/dotenvy that referenced this issue Oct 17, 2022
The UTF-8 Byte Order Mark `\ufeff` will be ignored when parsing.

See allan2#27
allan2 pushed a commit that referenced this issue Oct 17, 2022
The UTF-8 Byte Order Mark `\ufeff` will be ignored when parsing.

See #27
@allan2 allan2 closed this as completed Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants