mess code after Import from zip

LogicalDOC has many interesting features, but requires some configuration process to show its full potential.

Moderator: car031

Locked
yangdexin
Posts: 1
Joined: Fri Jul 22, 2016 8:50 am

mess code after Import from zip

Post by yangdexin » Mon Jul 25, 2016 3:07 am

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.
Attachments
pic1.jpg
pic1.jpg (4.82 KiB) Viewed 5677 times

agaspa
Posts: 521
Joined: Tue Apr 20, 2010 8:24 am

Re: mess code after Import from zip

Post by agaspa » Wed Aug 10, 2016 2:51 pm

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

shatzing
Posts: 36
Joined: Tue Jan 21, 2014 9:46 am

Re: mess code after Import from zip

Post by shatzing » Mon Sep 05, 2016 2:14 pm

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)
Attachments
ZipUtil-source-java.zip
Source file
(1.97 KiB) Downloaded 182 times
patchImportZipCharset.zip
Patch for Chinese simplified
(3.77 KiB) Downloaded 172 times

Locked

Who is online

Users browsing this forum: No registered users and 1 guest