GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — Preserve U+FEFF when Wtf8Decoder reads payload text by joshbarros · Pull Request #65460 · microsoft/TypeScript ConversationFixes #65458
A string or template value that starts with U+FEFF, or that has U+FEFF immediately after a lone surrogate, comes back from the API without that character. A U+FEFF in the middle of a segment stays. The input in the report has no file-level BOM. The Go filesystem reader already strips a UTF-8 BOM from source text before the compiler sees the file. This default restores the character inside payload text. The WASM file decoder already constructed The new test in
I also ran the report's async API script on Drafted with assistance from Grok. I reviewed the diff and ran those tests.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsTextDecoder drops a leading U+FEFF. Wtf8Decoder decodes each segment on its own, so the character was lost at the start of a string, a template, and the span after a lone surrogate. The constructor now defaults ignoreBOM to true. Passing false still opts out.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Approval recommendedNo active review issues are reported for the change preserving U+FEFF during native TypeScript text decoding. No open issues 🎉 What changed in this PRFixes #65458 by preserving U+FEFF in text decoded by the native TypeScript API, including literal values that begin with it or contain it immediately after a lone surrogate. Changes:
Review effort: Balanced
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Review feedback: the decoder should always set ignoreBOM to true, so the constructor no longer accepts decoder options. transport.ts no longer passes the redundant option.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. This branch has not been deployedNo deployments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
At least 1 approving review is required to merge this pull request. Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
For Uncommitted Bug
MilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Native API: Wtf8Decoder drops U+FEFF from string literals and template textUh oh!
There was an error while loading. Please reload this page. 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. | ||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |