I was working on a project with Claude Code. At some point it created a directory next to my project folder with a garbled Japanese name. Same 1_ prefix as my folder, but the rest was replaced by Japanese characters.
Went back to Claude for some digging (meta!). My folder name was pure ASCII, and ASCII bytes can’t produce multibyte Japanese characters through a simple encoding mismatch. Apparently this is called mojibake, and my case wasn’t even that. The likely explanation is that Claude Code emitted broken bytes in a shell command, and macOS created the directory without complaining.
Encoding bugs in Claude Code are well documented though. A few worth reading:
- Sandbox VM process name garbled on Japanese locale
- Write tool creates files outside working directory on Windows
- Literal
~/directory created instead of expanding home path - Edit tool silently corrupted Unicode in .md files for 12 days
- Chinese characters garbled in new files
- Korean folder names duplicated with different encodings
The one about writing outside the working directory is especially scary.
The folder was harmless. Deleted it, moved on. If you’re using Claude Code, check your project root for anything that shouldn’t be there.
Let's talk about it → hello@crlzff.xyz