Implement BOM stripping and ignoreBOM option in TextDecoder#4631
Merged
jedel1043 merged 2 commits intoboa-dev:mainfrom Feb 22, 2026
Merged
Conversation
Test262 conformance changes
Broken tests (1): |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4631 +/- ##
==========================================
+ Coverage 47.24% 56.58% +9.33%
==========================================
Files 476 548 +72
Lines 46892 60064 +13172
==========================================
+ Hits 22154 33987 +11833
- Misses 24738 26077 +1339 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
402d234 to
ac01cda
Compare
jedel1043
reviewed
Feb 20, 2026
Member
jedel1043
left a comment
There was a problem hiding this comment.
Thank you for the contribution! It looks very good, I just have a suggestion to simplify the new tests.
ac01cda to
dad96e6
Compare
Contributor
Author
|
Thanks for the review! Refactored the 9 individual BOM tests into 3 parameterized |
jedel1043
reviewed
Feb 20, 2026
dad96e6 to
4d90a2f
Compare
jedel1043
reviewed
Feb 20, 2026
…v#4613) Strip BOM bytes by default during decoding (UTF-8, UTF-16LE, UTF-16BE) per the WHATWG Encoding spec, and support the `ignoreBOM` constructor option to opt out of stripping. Add `ignoreBOM` getter property.
4d90a2f to
143447b
Compare
jedel1043
requested changes
Feb 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ignoreBOMconstructor option to opt out of strippingignoreBOMgetter propertyCloses #4613
Test plan
ignoreBOM: truepreserving BOM for all three encodingsignoreBOM: falsestripping BOM (same as default)ignoreBOMgetter returning correct valuesboa_runtimetests pass with zero warnings