Hello,
I'm Korean programmer.
i think this is really great solution and thank you for
your code.
i had a problem with loading ZipEntry in Korean.
but i did a fix with small amount of code change.
in ZipFile.readEntries() :
String name = new String(buffer, 0, 0, nameLen);
to
String name = new String(butffer);
in ZipFile.checkLockHeader() :
entry.getName().length() =>
entry.getName().getBytes().length
that's all.
can you commit this change?
i think this is a standard way for handling string.
thanks.
Logged In: NO
new String(buffer) uses the platform's default encoding.
This will not help if your zipfile comes from a computer
with another default encoding. I think the current
treatment is more correct: do not assume any encoding, user
can add that later as appropriate:
byte[] buffer;
String encoding;
ZipEntry.name().getBytes(0, l, buffer, 0);
Strring yourFilename = new String(buffer, encoding);