Page 1 of 1

zip - error importing file

PostPosted:Fri Aug 15, 2008 8:44 am
by mmart
Importing documents with zip file will result in java.lang.IllegaArgumentException, when there are extended characters in included documents filenames.

To reproduce
[file name=test.zip size=174]http://www.openkm.com/images/fbfiles/files/test.zip[/file]
Add document
pick file \"test.zip\"
check \"import documents\"
press send

Regards,
Mart Moldau

Re:zip - error importing file

PostPosted:Sat Aug 16, 2008 5:38 am
by tidus2728
Hi mmart,

I think OpenKM does not recognize your entended character set as they should be. If OpenKM sees them as spaces or underbars then it will display this error. I have documents in our system that have titles in Japanese font but have been uploaded successfully. You should name the files using the character set in the keyboard and not the ASCII equivalents to prevent such error.

Thanks.

Re:zip - error importing file

PostPosted:Mon Aug 18, 2008 6:26 am
by mmart
Hi

Everything works well when I upload this file uncompressed. I guess that zip files do not include information about encoding of the file names and OpenKM expects them to be in utf or something similar.
When this is the case, I think it is possible to make it better by catching this exception and retrying uncompression assuming that filenames are encoded using character set specified by client browser.
Even when this can\'t be done, error message like \"Unsupported character in filename: Ä\" will make more sense to users.

Regards,
Mart

Re:zip - error importing file

PostPosted:Mon Aug 18, 2008 7:35 am
by mmart
This seems to be related to this old (and still not fixed) jvm bug.

Regards,
Mart Moldau