Repository navigation
RemoveUnicodeCharacters: support Subtitle Edit Batch convert - #335
Merged
Merged
Conversation
- plugin.json "batch": true - batch request: replace only the characters in a batch list (default ♪/♫ -> # plus non-blank window replacements), keep all others, no UI - configure request: edit the batch list (add by glyph or U+XXXX) and an opt-in "remove every other non-ANSI character"; saved under batch-only keys that a normal run keeps but ignores - new RemoveUnicodeCharacters.Tests project, run by the workflow 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.
Adds Batch convert support (SubtitleEdit/subtitleedit#16036) to the SE5 Remove Unicode characters plugin.
What it does
plugin.json:"batch": true.okwithout subtitle. Settings are not returned.U+XXXXcodes (for invisible characters likeU+200B), and an opt-in "Also remove every other non-ANSI character". OK is always enabled and returns settings +settingsVersion, no subtitle. Cancel →cancelled.The judgement call: batch default
The window preselects every detected character with a blank replacement, i.e. "remove all above U+00FF". Doing that unattended would wipe Cyrillic, Greek, CJK, curly quotes, dashes, ellipses etc. from whole folders, so batch does not mirror the window's preselection here:
♪,♫→#) plus every non-blank replacement the user typed in the window. Blank window entries are ignored, because the window saves a blank entry for every row shown, including rows the user left unchecked, so a blank is no proof the user wants that character removed.batchReplacements,batchRemoveOthers); a normal run keeps them but ignores them, and Configure keeps the window'sreplacements.SE 5.3 compatibility
Old SE ignores
batchand only sendsrun; the run path is unchanged (the only difference is that the saved settings now also carry the batch keys through).Tests
se5/RemoveUnicodeCharacters.Tests(xUnit, modelled on FixEncodingErrors.Tests) withBatchModeTests(9 tests): defaults-only batch, nothing-to-change, blank window entries ignored, configured list, remove-others, legacy SubRip, settings round-trips both ways,U+XXXXparsing.testjob (build depends on it) and the Tests path filter.batchrequest.json → exit 0,♪ Привет ♫→# Привет #,don’t→don't(saved replacement).🤖 Generated with Claude Code