Skip to content

ktyubeshi/mojibake-inspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

日本語

Mojibake Inspector

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.

Features

  • 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

Use Cases

  • 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

Usage

  1. Open a text file or workspace in VS Code
  2. Run the "Find Mojibake Characters" command from the Command Palette (Ctrl+Shift+P)
  3. Choose search scope:
    • Current File: Searches only in the active text editor
    • Workspace: Searches in all files in the workspace (excluding specified patterns)

Extension Settings

This extension contributes the following settings:

  • mojibakeInspector.excludePatterns: Array of glob patterns to exclude from workspace-wide search json "mojibakeInspector.excludePatterns": [ "**/.git/**", "**/node_modules/**", "**/.venv/**", "**/venv/**", "**/__pycache__/**", "**/bin/**", "**/obj/**", "**/dist/**", "**/out/**" ]

Known Issues

Please report issues on the GitHub repository.

Release Notes

0.0.14

  • Added workspace-wide search capability
  • Added configurable search exclusion patterns
  • Improved diagnostic messages with Unicode code point reference (U+FFFD)
  • Added Japanese localization

License

MIT License


Enjoy!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published