Page 1 of 1

mess code after Import from zip

Posted: Mon Jul 25, 2016 3:07 am
by yangdexin
I like logicaldoc.
I encounter a problem similar to that raised by beikesea in 2011, see 'viewtopic.php?f=7&t=227&p=598&hilit=chinese#p598', that still not solved.
when I import from zip ,i get mess code ,see attached pic.
How shall I deal with this problem,pls give me some advice,Thank you in advance.

Re: mess code after Import from zip

Posted: Wed Aug 10, 2016 2:51 pm
by agaspa
This might happen because of 2 main reasons:
1) The zip archive was made on a PC/server with a charset encoding different from the one used by the server that runs LogicalDOC
2) The charset encoding of the database is not UTF-8 (see also the collation topic)
http://stackoverflow.com/questions/6115 ... n-to-utf-8
http://dev.mysql.com/doc/refman/5.7/en/ ... abase.html
https://docs.moodle.org/23/en/Convertin ... se_to_UTF8
https://www.a2hosting.com/kb/developer- ... base-utf-8

Re: mess code after Import from zip

Posted: Mon Sep 05, 2016 2:14 pm
by shatzing
The problem is that LogicalDOC imports from zip files using UTF-8 charset,
this should be the default for ZIP files, but in reality file names and folders in the zip file often are encoded using different charset (This is the case of ZIPs created by Windows).
https://marcosc.com/2008/12/zip-files-a ... -hate-you/

A temporary solution (for LD 7.5 upto 7.5.2) is to overwrite the file ZipUtil in the classpath
(To install just uncompress the file in folder C:\LogicalDOC\tomcat\webapps\ROOT\WEB-INF\classes then restart LogicalDOC/Tomcat system service)

The attached patch fixes the charset to GB2312 (Chinese simplified)