Skip to content

Strip a leading BOM from string input - #606

Merged
GrahamCampbell merged 1 commit into
masterfrom
fix/bom-string-input
Aug 24, 2026
Merged

GrahamCampbell merged 1 commit into
masterfrom
fix/bom-string-input

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Collaborator

Byte order marks are stripped when reading .env files but not when content is passed to the string parser, so the same bytes that load cleanly from a file throw an invalid-name error when handed to Dotenv::parse. Editors on Windows routinely prepend a UTF-8 byte order mark, and users increasingly fetch file contents themselves and parse the string. Stripping a leading UTF-8 byte order mark from string content makes the two entry points behave the same. This is stacked on #605.

@GrahamCampbell
GrahamCampbell force-pushed the perf/resolver-fewer-copies branch 2 times, most recently from 4bff462 to c535a66 Compare August 24, 2026 10:44
@GrahamCampbell
GrahamCampbell force-pushed the perf/resolver-fewer-copies branch from c535a66 to aa1dc16 Compare August 24, 2026 13:24
@GrahamCampbell
GrahamCampbell force-pushed the perf/resolver-fewer-copies branch from aa1dc16 to 3e31e8a Compare August 24, 2026 17:28
@GrahamCampbell
GrahamCampbell force-pushed the perf/resolver-fewer-copies branch from 3e31e8a to e3f463e Compare August 24, 2026 17:43
@GrahamCampbell
GrahamCampbell force-pushed the perf/resolver-fewer-copies branch from e3f463e to 7d5abcc Compare August 24, 2026 17:46
@GrahamCampbell
GrahamCampbell force-pushed the perf/resolver-fewer-copies branch from 7d5abcc to 1b25377 Compare August 24, 2026 17:47
@GrahamCampbell
GrahamCampbell force-pushed the perf/resolver-fewer-copies branch from 1b25377 to c0cbba6 Compare August 24, 2026 17:49
Base automatically changed from perf/resolver-fewer-copies to master August 24, 2026 17:50
@GrahamCampbell
GrahamCampbell merged commit 4f84f7e into master Aug 24, 2026
42 checks passed
@GrahamCampbell
GrahamCampbell deleted the fix/bom-string-input branch August 24, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant