Software

File name is garbled when we decompressed zip file.

File name is garbled when we decompressed zip file.

Zip file was that you got from internet or others.
This kind of trouble usually occurs.
Today I introduce the reason of garble and solution.


Reason

The reason of garble is Mac.

Encoding of Mac is UTF-8, but encoding of Windows is local encoding like Shift-JIS .
Zip file has space for encoding information of file name. So computer can translate encoding when it decompress zip file.

But Mac's default compress function does not write encoding information of file name. So Windows tried to decompress it as local encoding and file name is garbled.

Windows use CP932 to create zip file. But Windows check this flag when Windows decompress zip file. So Mac does not put this flag if utf-8 file name in zip file was garbled.
Garbled filename in zip file


Solution

There are 2 solutions.

  • Use correct decompress software
  • Use correct compress software


Use correct decompress software

Even Mac does not put encoding flag, good decompress software can decompress it without garbling file name.
Below software can decompress zip file correctly.



As I wrote, if you use 7-Zip, you can solve trouble about compress or decompress.



Lhaplus has garbling issue.


Use correct compress software

Instead of Mac's default compress function, it is good to use correct compress software.
I wrote below link as reference.

These problems are caused by Mac's default compress function. Do not use it. Use not-garbled-software like WinArchiver Lite.
Please do not compress file with using Mac's default function


Finally

  • The reason of garbled file name in zip file is because Mac's default function does not encoding information.
  • To avoid it, use correst compress or decompress software.


If you felt this article is useful, please share.

にほんブログ村 IT技術ブログへ

-Software
-, , , , ,

© 2024 ITips