Open chengshwu opened 6 years ago
I don't think that this is a issue related to the filename encoding but maybe I ignore some encoding problems on Windows.
On my Linux machine it works with python2.7:
Have you tried with other files?
the environment is windows7 32 bit , python3.6.4 .if I want use it ,how should I do?
I also have this issue, with python 3.6 and Vscode in windows 10 64 bit.
Also for me the same problem...
Same with me, Ubuntu 18.04, version Python 3.7.5
Same with me, Windows 7 64bit + Python 3.65 64bit filepath=r"三国.txt" # error in opening 三国.txt for reading filepath=r"sanguo.txt" import pyminizip pyminizip.compress(filepath, None, "r.zip", "123456", 0)
from pyminizip import compress compress("a.txt", None, "a.zip", "123456", 0) compress("甲.txt", None, "jia.zip", "123456", 0)
result:
Traceback (most recent call last):
File "C:\Users\dyjxx\Desktop\新的文档 1.py", line 4, in
compress_multiple alse has the same question: cannot process filename with Chinese chars
from pyminizip import compress_multiple compress_multiple(["a.txt","b.txt"], [], "ab.zip", "123456", 0) compress_multiple(["甲.txt","乙.txt"], [], "jiayi.zip", "123456", 0)
result:
Traceback (most recent call last):
File "C:\Users\dyjxx\Desktop\新的文档 1.py", line 17, in
I am expecting an solution for filename with Chinese chars in the new version.
same problem on win10 64bit, python 3.7 if chinese in input file name, compress("副本.txt", None, "jia.zip", "123456", 0) then get error : OSError: error in opening 副本.txt for reading
It actually has the problem in Windows platform when the src-path or dist-path contains any Chinese words .
However ,it works perfect in MacOS or other Linux platform. What a pity!
Same problem on win10 64bit, python 3.7 but when the path name includes ö or any other extended characters
OSError: error in closing
pyminizip.compress("D:\py\测试文件.txt", None, "D:\py\test.zip", "password", 5)
it will give the error : Exception "unhandled OSError" error in opening D:\py\测试文件.txt for reading