Unicode Fixer
Find, navigate, and fix unicode confusable and invisible characters (smart quotes, em dashes, zero-width spaces, Cyrillic/Greek homoglyphs, fullwidth ASCII, bidi controls, and more) without hunting for yellow boxes file by file.
Install
Search "Unicode Fixer" in the VS Code Extensions panel (Cmd/Ctrl+Shift+X) and install, or grab it directly: https://marketplace.visualstudio.com/items?itemName=aaron-qin.unicode-fixer
What it does
- Every issue in one place. Confusables show up as warnings in the Problems panel, across every scanned file. Click any entry to jump straight to it.
- Keyboard navigation.
F8 / Shift+F8 (VS Code's built-in marker navigation) cycles through issues in the current file. The commands Go to Next/Previous Issue cycle across all scanned files, wrapping around.
- One-click fixes. Lightbulb quick fix on any issue ("Replace U+2019 with
'"), plus Fix All in Current File and Fix All in Workspace (with a confirmation showing the total count).
- Fix on save (opt-in). Saving can auto-replace every fixable character, but this is off by default — turn it on with
unicodeFixer.fixOnSave: true once you trust the mappings for your codebase. It's off by default because it will silently rewrite legitimate non-English text (real Cyrillic/Greek prose, not spoofing) if your files contain any.
- Respects
.gitignore. Workspace scan/fix skip anything your .gitignore excludes, in addition to the unicodeFixer.exclude glob.
- Status bar counter. Shows the live issue count; click it to jump to the next issue.
Commands (Ctrl/Cmd+Shift+P)
| Command |
What it does |
Unicode Fixer: Scan Workspace |
Scan every file matching your include/exclude globs |
Unicode Fixer: Fix All in Current File |
Replace everything fixable in the active editor |
Unicode Fixer: Fix All in Workspace |
Replace everything fixable everywhere (asks first) |
Unicode Fixer: Go to Next / Previous Issue |
Jump across files |
Unicode Fixer: Clear Workspace Scan Results |
Drop scan results for closed files |
What gets flagged
- Typographic punctuation: smart quotes, en/em dashes, ellipsis, primes, minus sign
- Invisible characters: zero-width space/joiner, BOM, soft hyphen, word joiner, bidi controls (LRO/RLO etc. — a real source-code security risk)
- Lookalike letters: common Cyrillic and Greek homoglyphs (
\u0435 vs e, \u03BF vs o)
- Fullwidth ASCII (
\uFF41 vs a), ligatures (\uFB01), exotic spaces (NBSP, thin space, ideographic space)
- Any other invisible format character (Unicode category
Cf)
Emoji (including variation selectors and ZWJ inside emoji sequences flagged only as the raw joiner) and ordinary non-Latin text you actually typed in a natural language are not mass-rewritten: only characters with an explicit safe mapping are auto-fixed. Whitelist anything with unicodeFixer.allowedCharacters, or add your own replacements with unicodeFixer.customMappings.
Settings
| Setting |
Default |
Purpose |
unicodeFixer.enable |
true |
Live diagnostics on open files |
unicodeFixer.fixOnSave |
false |
Auto-fix when saving |
unicodeFixer.include / exclude |
**/* / node_modules etc. |
Workspace scan scope |
unicodeFixer.maxFileSizeKB |
1024 |
Skip huge files in scans |
unicodeFixer.customMappings |
{} |
Add or override replacements; map a char to itself to whitelist it |
unicodeFixer.allowedCharacters |
[] |
Characters to never flag |
unicodeFixer.severity |
Warning |
Diagnostic severity |
Caveats
- The ZWJ (
U+200D) is flagged for removal; if your codebase contains emoji ZWJ sequences in string literals, whitelist it via allowedCharacters.
- Workspace scan opens each candidate file to compute positions; very large repos should narrow
include or rely on the excluded-folders default.
| |