VS Code extension to detect and highlight mojibake U+FFFD (replacement characters) in text files, particularly those caused by Cursor.
This extension is designed to help developers identify potential encoding issues that may occur in code generated by Cursor, where text might be incorrectly encoded and displayed as U+FFFD replacement characters.
- Detects U+FFFD (replacement character) in text files
- Highlights detected characters with red background
- Shows warnings in the Problems panel
- Supports both single file and workspace-wide search
- Configurable search exclusion patterns
- When code is generated by Cursor, some characters might appear as U+FFFD due to encoding issues
- This extension helps identify these potential mojibake characters quickly
- Particularly useful when working with generated code containing non-ASCII characters
- Open a text file or workspace in VS Code
- Run the "Find Mojibake Characters" command from the Command Palette (Ctrl+Shift+P)
- Choose search scope:
- Current File: Searches only in the active text editor
- Workspace: Searches in all files in the workspace (excluding specified patterns)
This extension contributes the following settings:
mojibakeInspector.excludePatterns
: Array of glob patterns to exclude from workspace-wide searchjson "mojibakeInspector.excludePatterns": [ "**/.git/**", "**/node_modules/**", "**/.venv/**", "**/venv/**", "**/__pycache__/**", "**/bin/**", "**/obj/**", "**/dist/**", "**/out/**" ]
Please report issues on the GitHub repository.
- Added workspace-wide search capability
- Added configurable search exclusion patterns
- Improved diagnostic messages with Unicode code point reference (U+FFFD)
- Added Japanese localization
Enjoy!