I recently completed a project that required the initial database to contain UTF8 encoded text. Since the initdb scripts are assumed to be ascii encoded, I had to make a minor modification to docker-entrypoint.sh.
mysql=( mysql --protocol=socket --default_character_set=utf8 -uroot )
This change was not a big deal for me, but I am raising the question as to whether this would be a good default. I can't think of any way it breaks compatibility with existing scripts, and the new default would provide a real benefit to anyone working with UTF8 encoded data.
Of course, an even better solution may be to use a variable.
(One step at a time...)
I recently completed a project that required the initial database to contain UTF8 encoded text. Since the initdb scripts are assumed to be ascii encoded, I had to make a minor modification to
docker-entrypoint.sh.mysql=( mysql --protocol=socket --default_character_set=utf8 -uroot )This change was not a big deal for me, but I am raising the question as to whether this would be a good default. I can't think of any way it breaks compatibility with existing scripts, and the new default would provide a real benefit to anyone working with UTF8 encoded data.
Of course, an even better solution may be to use a variable.
(One step at a time...)