Page 1 of 1

[Windows] Tool for Automatically Repairing Mojibake File Names (CJK)

Posted: Sun Aug 02, 2026 8:22 am
by warsan
Hi everyone,

I'm currently cleaning up my aging music database. For this I've built a Python script for my own music library that fixes old garbled filenames (Japanese/Chinese/Korean titles that were decoded as a Windows code page instead of UTF-8—the classic "é"/"驮" gibberish)—in two steps:

1. Automatically, but only upon confirmation. The filename is test-decoded against several encodings (Shift-JIS, GBK, EUC-KR, Big5, UTF-8) and compared with the file’s ID3/MP4 tag. Renaming occurs only if both independent sources match; it never guesses. A broken tag (missing, garbled characters, or a plain “?” placeholder) is corrected at the same time.

2. Interactive review round for the rest. The script displays items that cannot be automatically confirmed grouped by album folder (all affected files, including possible encoding candidates); you enter the appropriate encoding once for the entire folder, can skip individual folders, or cancel the process at any time.

There’s also a dry-run mode that shows in advance what would happen.

The folder structure hardly matters. The catch: It’s currently tightly tied to MediaMonkey 5 (re-links path changes directly in its SQLite database); without that, it would crash.

To release it, I’d have to generalize it, document it (README, installation), and then continue to support it. So here’s my question up front: Would this be relevant to any of you?