sameersbn / docker-redmine

Docker Image for Redmine
http://www.damagehead.com/docker-redmine/
MIT License
1.25k stars 491 forks source link

README: mention utf8mb4 for full unicode support #541

Closed jdsn closed 4 months ago

jdsn commented 4 months ago

The 4 byte utf8 implementation is needed to support all unicode characters. Otherwise only a subset of them are usable.

Using utf8mb4 fixes

Note: The database (in this case only applies to mariadb and mysql) also needs to be adjusted accordingly.

jcormier commented 4 months ago

Could you add a link to the following wiki to the updated docs? https://www.redmine.org/projects/redmine/wiki/HowTo_convert_a_database_from_utf8_to_utf8mb4

Note that I would also be interested in a patch that updated this to be the default encoding.

Alteast we can update the docker compose examples. For example, docker-compose-mysql.yml:

 mysql:
...
    environment:
...
    - MYSQL_CHARSET=utf8mb4
    - MYSQL_COLLATION=utf8mb4_unicode_ci

  redmine:
...
    environment:
...
    - DB_ADAPTER=mysql2
    - DB_ENCODING=utf8mb4
jdsn commented 4 months ago

Btw. Redmine upstream switched to utf8mb4 as the default quite some time ago: https://github.com/redmine/redmine/commit/69dcf527358b7a3ecaa92098048d40710b245211

jdsn commented 4 months ago

Changing the default to utf8mb4 is a good idea.

@jcormier Do you expect that the conversion is done automatically by a new tool in assets/runtime/.. ? I'd prefer to discuss this in a separate issue or PR.

jcormier commented 4 months ago

@jcormier Do you expect that the conversion is done automatically by a new tool in assets/runtime/.. ? I'd prefer to discuss this in a separate issue or PR.

Yeah agreed. I am wary of changing defaults if it breaks peoples existing containers, but agree it would make a lot of sense as a default