You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to zip kinds of files,but I try many times I just can't zip chinese name file,such as
zip.file('顶顶顶顶', fs.readFileSync(path)); .Can you help me ? Thank you very much!
The text was updated successfully, but these errors were encountered:
kooksee
changed the title
why I can use it with chinese file name
why I can't use it with chinese file name
Aug 5, 2015
What do you use to check the result ? Windows 7's explorer ?
JSZip uses UTF8 to encode/decode the file name inside a zip file (see also #211 for other encodings).
Unfortunately, the compressed folders feature on Windows (up to and including Windows 7) uses the locale of the machine which will open the file (even with an unicode flag). Other file archivers that handle UTF8 will be fine (I just tested your example on my machine).
If you use #211 to use a different encoding for the file name, you might have issues with other tools like 7zip which only understand UTF8.
This issue is not specific to JSZip, others have this issue too (1, 2, 3).
We need to add this in the documentation, this question is asked regularly.
I want to zip kinds of files,but I try many times I just can't zip chinese name file,such as
zip.file('顶顶顶顶', fs.readFileSync(path)); .Can you help me ? Thank you very much!
The text was updated successfully, but these errors were encountered: