Difference between revisions of "Store filenames with emoticons"
From LogicalDOC Community Wiki
Jump to navigationJump to searchLine 5: | Line 5: | ||
First you have to add a couple of parameters to the jdbc connection url of LogicalDOC | First you have to add a couple of parameters to the jdbc connection url of LogicalDOC | ||
# Shutdown LogicalDOC system service/daemon | # Shutdown LogicalDOC system service/daemon | ||
− | # Locate the file context.properties in <LOGICALDOC_INSTALLATION_DIR>/conf | + | # Locate the file '''context.properties''' in <LOGICALDOC_INSTALLATION_DIR>/conf |
# Edit the file context.properties by adding a couple of parameters to the value of key jdbc.url | # Edit the file context.properties by adding a couple of parameters to the value of key jdbc.url | ||
− | # Locate the key jdbc.url and add the parameters characterEncoding=utf8&allowPublicKeyRetrieval=true <br/>e.g.: jdbc.url=jdbc:mysql://localhost:3306/ | + | # Locate the key '''jdbc.url''' and add the parameters '''characterEncoding=utf8&allowPublicKeyRetrieval=true''' <br/><pre>e.g.: jdbc.url=jdbc:mysql://localhost:3306/logicaldoc?useSSL=false&characterEncoding=utf8&allowPublicKeyRetrieval=true</pre> |
# Save the file and restart LogicalDOC system service/daemon | # Save the file and restart LogicalDOC system service/daemon | ||
Revision as of 07:28, 19 September 2019
You must have a MySQL 5.7-8/MariaDB database with utf8md4 settings
Since this is not a risk-free operation it is necessary to back up the database before proceeding.
First you have to add a couple of parameters to the jdbc connection url of LogicalDOC
- Shutdown LogicalDOC system service/daemon
- Locate the file context.properties in <LOGICALDOC_INSTALLATION_DIR>/conf
- Edit the file context.properties by adding a couple of parameters to the value of key jdbc.url
- Locate the key jdbc.url and add the parameters characterEncoding=utf8&allowPublicKeyRetrieval=true
e.g.: jdbc.url=jdbc:mysql://localhost:3306/logicaldoc?useSSL=false&characterEncoding=utf8&allowPublicKeyRetrieval=true
- Save the file and restart LogicalDOC system service/daemon
Connect to the database using mysql client
mysql -u root -p logicaldoc
Check the status of the charset settings are OK with the query below
SHOW VARIABLES LIKE 'char%';
Execute the following SQL statements on the relevant field of the tables: ld_document, ld_version, ld_history
ALTER TABLE
ld_document
CHANGE ld_filename ld_filename
VARCHAR(255)
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
ALTER TABLE
ld_version
CHANGE ld_filename ld_filename
VARCHAR(255)
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
ALTER TABLE
ld_history
CHANGE ld_filename ld_filename
VARCHAR(255)
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;