• Problems with special Characters in openkm / docker

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #52603  by jlg
 
Hi,
we recently switched from openkm 6.3.2 (windows installer, hsqldb) to openkm 6.3.9 (docker, mysql). Eveything works fine expect the file import where we are missing a couple of files having ampersands (R&D.pdf), etc.) in their filenames.

Exported Files (From Admin Panel):
Code: Select all
-rw-r----- 1 root      root          0 Jul 12 13:52 'R&D.pdf'
-rw-r----- 1 root      root        663 Jul 12 13:52 'R&D.pdf.okm'
Code: Select all
nano 'R&D.pdf.okm'
{"uuid":"fec594d8-2c52-4f21-8632-23fdbbbb2b55","author":"okmAdmin","name":"R\u0026amp;D.pdf","path":"/okm:root/R\u0026amp;D.pdf",...
The problem is the difference between the filename and their database entry and can be solved by renaiming the files to "R\u0026amp;D.pdf" and "/okm:root/R\u0026amp;D.pdf" as stored in the database. After that the import works and the filename in openKM Desktop is correct 'R&D.pdf'. But if the file is downloaded its download name is 'R&D.pdf'. The Problem is Edit and Update of this file only works with this filename. Using a file named 'R&D.pdf' throws a file not found error.

This behaviour can simply be reproduced by starting openkm via docker
Code: Select all
docker run --name openkm-ce -p 8080:8080 openkm/openkm-ce
- Login
- add document 'R&D.pdf'
- edit 'R&D.pdf' (download filename is 'R&D.pdf')
- update 'R&D.pdf' (using file with original filename throws file not found error)
- update 'R&D.pdf' (using downloaded file with filename 'R&D.pdf' works)

I think tomcat didn't correctly en- or decoded the filenames. I've tried to add the tag URIEncoding="UTF-8" to all connectors in my server.xml and enable the setCharacterFilter ind web.xml as explained here https://javavids.com/video/apache-tomcat-utf-8 but without any changes.

Hopefully someone can help me with this Issue.

Best regards
jlg
 #52633  by jllort
 
* The web.xml should not be changed.
* HSQLDB database should not be used in production ( use MySQL, MariaDB, etc.. )

I have done some test and in the screenshots will see the results:
Selección_046.png
Selección_046.png (59.77 KiB) Viewed 7872 times
Selección_047.png
Selección_047.png (30.91 KiB) Viewed 7872 times
Selección_048.png
Selección_048.png (91.3 KiB) Viewed 7872 times
May be it is a bug, please add the issue at https://github.com/openkm/document-mana ... tem/issues and in the content please share the link of this post
 #52727  by jllort
 
Ok, Anyway use regular database like mysql, postgresql .... do not try with hsql should never be used for production environments. If error persist explain with more detail. If you are sure it is a bug, register at https://github.com/openkm/document-mana ... tem/issues

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.