Traduzco la documentación oficial de Nextcloud para este punto.
Important!
Para usar emojis (caritas basadas en texto) en tu servidor Nextcloud con una base de datos MySQL/MariaDB, hay que retocar un poco la instalación.
Warning!
Este manual solo cubre MySQL 8 o posterior y MariaDB 10.2 o posterior. Si usas MariaDB 10.2, por favor, comprueba esta versión más antigua de la documentació. Si usas una versión más antigua de MySQL o MariaDB, por favor ten en cuenta que ya no está soportada por la versión actual de Nextcloud (N. del T.: noviembre de 2024)
- Asegúrate de que tu servidor MySQL tiene la siguiente configuración de InnoDB:
[mysqld] innodb_file_per_table=1
- Reinicia el servidor MySQL si has tenido que cambiar la configuración en el paso 1.
Ahora puedes verificar que el cambio ha tenido lugar:
SHOW VARIABLES LIKE 'innodb_file_per_table';
El resultado debería ser parecido a este:
mysql> SHOW VARIABLES LIKE 'innodb_file_per_table';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| innodb_file_per_table | ON |
+-----------------------+-------+
1 row in set (0.00 sec)
- Open a shell, change dir (adjust
/var/www/nextcloud
to your nextcloud location if needed), and put your nextcloud instance in maintenance mode, if it isn’t already:$ cd /var/www/nextcloud $ sudo -u www-data php occ maintenance:mode --on
- Change your databases character set and collation:
ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
- Set the
mysql.utf8mb4
config to true in your config.php:$ sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"
Convert all existing tables to the new collation by running the repair step:
$ sudo -u www-data php occ maintenance:repair
Note
This will also change the ROW_FORMAT to DYNAMIC for your tables.
- Disable maintenance mode:
$ sudo -u www-data php occ maintenance:mode --off
Now you should be able to use Emojis in your file names, calendar events, comments and many more.
Note
Also make sure your backup strategy still work. If you use mysqldump
make sure to add the --default-character-set=utf8mb4
option. Otherwise your backups are broken and restoring them will result in ?
instead of the emojis, making files inaccessible.
Comentarios recientes