Internal Server Error on WebUI with Cyrillic names, logs provided

Hello,
I have a problem with Seafile Server CE version 10.0.1 running on Rocky Linux. When I try to upload a file through the web interface (on a Windows 11 PC) and the file has a Cyrillic name the interface returns “Internal Server Error”. If I rename the file with English/Latin chars, the file is uploaded without a problem. Tried it with doc, docx, jpg files, and the same thing happens every time. It happens both with encrypted and non-encrypted libraries. Tried on two different browsers: Chrome and Firefox.
The errors in the error logs are as follows:

seafile.log:

2024-08-16 15:20:20 …/common/seaf-db.c(1043): Failed to execute sql SELECT tmp_file_path FROM WebUploadTempFiles WHERE repo_id = ? AND file_path = ?: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘=’

seahub.log:

the error from seahub.log is: 2024-08-16 15:20:20,416 [ERROR] seahub.api2.endpoints.repo_file_uploaded_bytes:52 get Failed to get upload temp file path from db.
2024-08-16 15:20:20,417 [ERROR] django.request:224 log_response Internal Server Error: /cloud/api/v2.1/repos/71b239f2-63c1-4fa5-83ed-22560af0a762/file-uploaded-bytes/

It appears the problem is in a mix of db collations but I don’t want to change collations without knowing it’s ok to do so. Any help would be appreciated, thank you in advance.

For anyone wondering about this issue: after some digging I found that the collation of the seafile db’s is not OK for Cyrillic chars. Make sure that the default collation and charset in mysql’s my.cnf is set to proper utf8 variants: charset should at least be utf8 and collation utf8_general_ci. I tried using utf8mb4 and utf8mb4_unicode_ci but it seems that by default seafile uses utf8_general_ci in some places so in the end I used utf8 for charset and utf8_general_ci for collation.