Repository navigation
Open files that contain U+2029 - #13
Merged
Merged
Conversation
QTextDocument separates its blocks with U+2029, so Plain refused any file holding one rather than turn it into a line break. Hold it in the editor as a private-use stand-in, U+E029, and turn it back on save, so the file round-trips byte for byte. Only a file that already holds the stand-in is refused now. FindBar.qml spells its own U+2029 as an escape rather than the invisible character. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] No new blocking issue was found in the latest changes. SummaryPlain can open files containing U+2029 by holding that character as U+FDEF and restoring it on save.
Reviews (2) · Last reviewed commit: "Stand U+2029 in with a noncharacter rath..." · Reviewed by Greptile |
A private-use character could be pasted or typed in and would then be saved as U+2029. U+FDEF is a noncharacter, set aside for a program's own use, so text won't hold one. Not U+FDD0, which Qt already uses to begin a frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Plain refused any file with a U+2029 paragraph separator in it, since QTextDocument uses that character to separate its blocks and would have turned it into a line break. Even Plain's own
FindBar.qmlcouldn't be opened.Now a U+2029 is held in the editor as U+FDEF and turned back on save, so the file round-trips byte for byte. U+FDEF is a Unicode noncharacter, set aside for a program's internal use, so typed or pasted text won't carry one (U+FDD0 is out, since Qt uses it to begin a frame). Only a file that already contains U+FDEF is refused, since saving would change it. The stand-in likely shows as a placeholder glyph, and copying it puts U+FDEF on the clipboard.
FindBar.qmlnow spells its own U+2029 as" "instead of the invisible character.🤖 Generated with Claude Code