
How to use Claude Code in Shift JIS
How to use Claude Code in Shift JIS
If you've ever tried using Claude Code on Windows with a Shift JIS code base, you've definitely encountered some frustrating issues. The native Read, Edit, Write, and Grep tools only work in UTF-8, and attempts to work with Shift JIS files often lead to garbled text called "mojibake" in Japanese.
I wanted a way to get around this, and what I came up with is an MCP server that provides alternative Read, Edit, Write and Grep tools that can handle CP932, the Windows variant of Shift JIS. This allows you to easily use Claude Code with Shift JIS code bases.
You can find the code and installation instructions for this MCP server on my GitHub: MichaelCharles/cp932-tools-mcp-server
I've been successfully using it to work with Claude Code on a legacy Delphi 2007 code base for the past few months, and it has been working like a charm.
It's setup to work correctly and preserve the original file encodings even if you use the CP932 variant tools on UTF-8 files, so you can use it on mixed code bases without worrying about corrupting your files.