Skip to content
Aback ZIP

Troubleshooting · 5 min read · Updated

Why ZIP file names are garbled, and how to fix them

Why file names in a ZIP turn into symbols like ╬─╝■.txt on another computer, how to repair them without asking for the archive again, and how to create ZIPs whose names survive.

You open a ZIP from a colleague abroad and the files are called ╬─╝■.txt or âeâXâg.txt instead of Chinese or Japanese names. The files themselves are almost always fine. Only the names were stored in a way your computer had to guess at, and it guessed wrong. This kind of garbled text is often called mojibake.

What garbled names look like

Original nameStored by the sender's PC asRead as CP437, the ZIP default
文件.txtGBK (Chinese Simplified Windows)╬─╝■.txt
テスト.txtShift_JIS (Japanese Windows)âeâXâg.txt
Отчет.docxCP866 (Russian Windows)ÄΓτÑΓ.docx

The exact symbols vary, because each app falls back to a different guess. The pattern is the same: names in a non-Latin script become accented letters, Greek letters and box-drawing characters, while the plain ASCII parts, such as .txt, come through unchanged.

Why it happens

A file name is stored in a ZIP as a sequence of bytes, and for a long time the format had no way to say which character set those bytes use. The specification says IBM code page 437, the original US PC character set, but many Windows programs simply wrote names in the computer's legacy code page instead: Shift_JIS on a Japanese system, GBK on a Chinese one, CP866 on a Russian one.

In 2006 the ZIP specification added a flag, bit 11 of the general purpose flags, that marks a name as UTF-8. An app that sees the flag knows exactly how to read the name. When the flag is missing, the app has to guess, usually CP437 or UTF-8, and a name written in Shift_JIS or GBK comes out as gibberish.

Archives without the flag typically come from:

  • Windows File Explorer on non-English versions of Windows, using Send to > Compressed (zipped) folder.
  • Older versions or settings of WinRAR, 7-Zip and other archivers, some of which only switch to UTF-8 when a name doesn't fit the local code page.
  • Old archives from CDs, backups and download sites, made before UTF-8 names were common.

The sender usually sees nothing wrong: a computer with the same language setting guesses the same code page and shows the names correctly. The problem only appears when the archive crosses to a different system, such as from Japanese Windows to a Mac or from Russian Windows to Linux.

Fix the names in your browser

  1. Open Fix ZIP Filenames and choose the ZIP.
  2. The tool looks at names stored without the UTF-8 flag that contain non-ASCII bytes, scores every supported encoding against the raw bytes and preselects the most likely one.
  3. Compare the before and after samples. If the names still look wrong, choose another encoding, for example Big5 instead of GBK for Traditional Chinese.
  4. Download the fixed ZIP. Names are stored as UTF-8 with the flag set. File data, including encrypted files, is copied byte for byte, so no password is needed and nothing else changes.
Language of the namesEncodings to try
JapaneseShift_JIS (CP932), then EUC-JP
Chinese (Simplified)GBK (CP936), then GB18030
Chinese (Traditional)Big5 (CP950)
KoreanCP949 / EUC-KR
Russian and other CyrillicCP866, Windows-1251, KOI8-R
Central and Western EuropeanWindows-1250, Windows-1252, CP437
Greek, Turkish, Hebrew, Arabic, Thai, VietnameseWindows-1253, 1254, 1255, 1256, 874 and 1258

Some programs replace characters they can't store with ? or _ when creating the ZIP. Those names can't be repaired, because the original characters are not in the file. Ask the sender to create the archive again with UTF-8 names.

On Debian and Ubuntu, unzip has an option to read names in a given code page while extracting, for example unzip -O CP936 archive.zip for Simplified Chinese. That fixes the names on your computer only; the archive itself stays as it was.

Avoid garbled names when creating ZIPs

  • Use Create ZIP, which always stores names as UTF-8 and sets the flag when a name contains non-ASCII characters.
  • In 7-Zip, enter cu=on in the Parameters box when creating a ZIP, or add -mcu=on on the command line, to store every name as UTF-8.
  • If you zip files with non-English names in Windows File Explorer and the archive is going to another country or another operating system, check it on that system before relying on it, or use a tool that writes UTF-8 names.
  • Sending to someone with the same Windows language setting is not a problem. Garbled names appear when the archive crosses between systems.

Tools for this

Frequently asked questions

Almost never. Only the names are affected; the file contents are stored separately and extract normally, just under the garbled names. Extract ZIP can open them, but fixing the names first saves renaming every file.

More guides