Failed when type Vietnamese

Added by Vu Le about 1 month ago

Hello,

I have installed Redmine by docker-compose, but when I typing Vietnamese encoding, It's not working, The Redmine can't save the text Vietnamese.
I can't find a file log to investigate the issue. I tried to change the character set in MySQL from latin1 to Utf8 but it's not working.

Pls, help me.
!!!!

issue.PNG (24.8 KB)

redmine issue.PNG (99.7 KB)

Replies (6)

RE: Failed when type Vietnamese - Added by Vu Le about 1 month ago

Xin hãy hỗ trợ tôi.

RE: Failed when type Vietnamese - Added by Tatsuya Saito about 1 month ago

What version of Redmine do you use?
And can you show your docker-compose.yml?

RE: Failed when type Vietnamese - Added by Vu Le about 1 month ago

Hello Tatsuya Saito,

This is my information, and file docker-compose in the attachment.

Environment:
Redmine version 4.1.1.stable
Ruby version 2.6.6-p146 (2020-03-31) [x86_64-linux]
Rails version 5.2.4.2
Environment production
Database adapter Mysql2

Thank you.

docker compose.PNG (9.95 KB)

RE: Failed when type Vietnamese - Added by Vu Le about 1 month ago

Hello,

This is a log by docker container Redmine, when I submit some text with Vietnamese encoding:

error.PNG (56.6 KB)

RE: Failed when type Vietnamese - Added by Tatsuya Saito about 1 month ago

Following error is occured with inputing Xin hãy hỗ trợ tôi.

ActiveRecord::StatementInvalid in ProjectsController#create
Mysql2::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '<': SELECT MAX(`projects`.`rgt`) FROM `projects` WHERE `projects`.`parent_id` IS NULL AND (name < 'Xin hãy hỗ trợ tôi.')

So you need a setting of character set for mysql.
Please try attached docker-compose.yml.

Hope your helpful.

docker-compose.yml Magnifier (477 Bytes)

RE: Failed when type Vietnamese - Added by Vu Le about 1 month ago

Very nice, It's work!

Thank you.

(1-6/6)