Zip icon indicating copy to clipboard operation
Zip copied to clipboard

Compressed files in Windows under the extract, including the Chinese file will be garbled

Open shalyf opened this issue 7 years ago • 9 comments

Such as title

shalyf avatar Mar 10 '17 13:03 shalyf

Not enough information to reproduce anything, please post more information with examples

mostafaberg avatar Mar 30 '17 07:03 mostafaberg

Files_downloaded_by_AirDroid.zip This file(contains two image file: 中文名1.jpg, 中文名2.jpg) is compressed with Zip.zipFiles(paths:zipFilePath:password:progress:). It opened under the macOS is normal, but in Windows will be garbled.

shalyf avatar Mar 30 '17 07:03 shalyf

Do you have a screenshot on what it looks like in windows ?

mostafaberg avatar Mar 30 '17 07:03 mostafaberg

Wait a moment, I can not upload screenshots now

shalyf avatar Mar 30 '17 07:03 shalyf

b170212888aebdb8ab6d0966d3bdd55e 221d2311af89377bccbf18a413ccfd1c

shalyf avatar Mar 30 '17 07:03 shalyf

I can see the same too, seems like I'm getting different characters too. since it works on OSX i would guess maybe it has something to do with the windows environment ?

mostafaberg avatar Mar 30 '17 08:03 mostafaberg

This is the information I found: macOS system comes with the compression program on the zip file name UTF-8 encoding, but the zip file header does not declare PKZIP high version of the enhanced Unicode bit. Windows will think that the file name is ANSI encoding, the results show garbled.

shalyf avatar Mar 30 '17 08:03 shalyf

That's a good find. for the time being until someone can look into this you can use ASCII filenames as a workaround?

mostafaberg avatar Mar 30 '17 09:03 mostafaberg

thx, but the file name is not what I can decide.

shalyf avatar Mar 30 '17 09:03 shalyf