Repository navigation
Diagnose possible encoding mismatch and preserve cancelled reopen edits - #115
Closed
jonaraphael wants to merge 3 commits into
Closed
jonaraphael wants to merge 3 commits into
jonaraphael wants to merge 3 commits into
Conversation
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.
The original #76 attachment is not valid UTF-8: its product-name bytes decode correctly with explicit CP437 or CP850, which are indistinguishable for that particular file. CSV renders VS Code's already-decoded TextDocument, so correcting this input requires reopening the original bytes with the source encoding before saving.
Add a once-per-document, nonmodal warning when replacement characters suggest a possible decoding mismatch, with an action bound to that file's existing encoding command. Stop the encoding flow when closing a dirty tab is cancelled, preserving unsaved edits. Document Reopen with Encoding and the supplied fixture's ambiguity. No automatic encoding inference, transcoding or repair of already replaced text; U+FFFD may also be legitimate, and other kinds of wrong decoding may not trigger the warning.
Addresses #76. This does not claim automatic encoding detection or replace VS Code's decode/save pipeline.
Stacked on #109 (base codex/fix-edit-integrity) for safe document operation ordering and behavioral test fixtures.
Validation:
Independent orchestrator review: final warning rejection/disposal safeguards passed compile, lint and all 127 tests. Current CI succeeds and the PR is mergeable. This provides safe encoding guidance; it does not uniquely auto-detect CP437/CP850 or transcode files.
Cross-feature integration: the isolated combined checkout containing #109, #111–#120 (excluding partial #110) passes compile, lint (0 errors; existing warnings) and 242 tests. Shared manifest/command conflicts were resolved and checked in that integration branch. No PRs have been merged.