When the names in a ZIP come out garbled.
Read garbled ZIP file names again in your browser, with nothing uploaded: as Japanese, Chinese, Korean, Cyrillic or another way, under More options.
By Suraj Kumar4 min read
You open a ZIP from a colleague in Tokyo or Shanghai and the names are strings of accented letters and box lines. The files are fine. Only the way their names are read is wrong, and you can choose another.
Why it happens.
A name is stored in a ZIP as bytes. The ZIP specification has a flag that says the bytes are UTF-8, which every language can be written in. Without it, the specification says to read them as IBM code page 437, the letters of old DOS computers.
Many programs wrote names in their own computer's code page and did not say so: Shift_JIS on Japanese Windows, GBK or Big5 on Chinese, EUC-KR on Korean, and others for Cyrillic, Greek or Central European letters. Read as code page 437, those names come out garbled.
How this page reads names.
In turn: when the flag says UTF-8, as UTF-8. Otherwise, a second name in Unicode that Info-ZIP's programs add, when its check matches. Otherwise, as UTF-8 when the bytes are valid UTF-8, as Macs write them without the flag. Otherwise, as code page 437.
Choose another way.
Open More options, which holds Names, hidden files and details. Under Read the names as, the page says how the names were read. Choose another from the list: the likeliest come first, each with one of the archive's names read that way, so you can pick the one that reads as words. The list is read again at once, with nothing taken out.
It is a guess, and it can be wrong. Chinese names, for one, often read as words in both GBK and Big5. If you are not sure, ask the sender which language their computer uses.
TAR and .gz files.
The choice is for ZIP files only. Names in a TAR are read as UTF-8, which newer TARs always use. A TAR name written in another code page shows replacement characters.
When you send a ZIP.
Use a program that marks its names as UTF-8, and the names arrive as you wrote them. The ZIP this tool makes when you download several files at once marks its names that way.
Further reading
Topics: zip file names garbled · zip mojibake · zip japanese file names · shift_jis zip · gbk zip file names · cp437 zip · unzip wrong characters · zip encoding utf-8
A little less theory. A little more doing.
Try it on your own terms, with a free browser tool.
Try the tool