Repository navigation
Add SE5 Fix encoding errors plugin - #321
Merged
Merged
Conversation
Repairs UTF-8 text that was read with the wrong code page (mojibake): résumé -> résumé, don’t -> don’t, also when lowercased afterwards (rã©sumã©). Western, Central European, Cyrillic, Greek, Turkish and Baltic code pages with auto-detect; checkable before/after preview. 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.
New SE5 plugin Fix encoding errors (
se5/FixEncodingErrors). It repairs UTF-8 text that was read with the wrong code page and saved again (mojibake):résumé→résumé,don’t→don’t,25°→25°,😀→ 😀rã©sumã©→résuméwhen the text was lowercased after it broke (a user report: Madam Secretary SRTs extracted from MKV)Привет/Привет→Привет, and Greek, Hebrew and Arabic misread as Western0x9D(â€→”), no-break space turned into a normal space (Ã→à), BOM as text (), text broken twiceMatroska text tracks are UTF-8 by spec, so SE shows what is stored; the damage happened before muxing.
How it works: each character is mapped back to its byte in the code page and runs that form valid UTF-8 are decoded. Code pages: 1252, 1250, 1251, 1253, 1254 and 1257, with auto-detect.
False-fix guards:
ојnever becomes Greekμ.Não”,irmã…) are fixed only when the subtitle is clearly broken: it has unambiguous matches and they cover ≥30% of its non-ASCII characters.Checked:
UI follows Italic each line: a code-page picker, All/Selected lines scope, and checkable before/after cards with diff highlighting. Light and dark were checked headless. Not yet run inside a real SE.
After merge: dispatch
fix-encoding-errors.ymlwith release=true, then add it tose5-plugins.json.🤖 Generated with Claude Code