docker
docker copied to clipboard
Locale problem and support for UTF-8 file names
Used names of files and folders with accents (Brazil pt_BR). I had to set the chart and set the environment variables. To work I had to add these environment variables:
env:
- name: LC_ALL
value: C.UTF-8
- name: TZ
value: America/SaoPaulo
Can you add this by default to avoid future problems?
Would be be fine to add
LC_ALL=C.UTF-8
LANG=C.UTF-8
Without it I have some errors with large file names sync. This is worsened by another problem: something like ".ocTransferId1997286732.part" is added while ownCloud client tries upload file.
Hey, since this issue seemed to have gotten lost among all the other open ones, I thought I'd leave a quick comment. I just experienced a problem with nextcloud this week regarding files and folders with unicode characters in their names (similar/identical to the problem described here).
I was able to fix said problem by adjusting the locale inside of the container from POSIX
to en_US.UTF-8
using docker-compose's environment section:
environment:
...
- "LC_ALL=en_US.UTF-8"
- "LANG=en_US.UTF-8"
- "LANGUAGE=en_US.UTF-8"
...
It would be lovely if an active maintainer could actually implement the locale setting directly into the Dockerfile, so that this has not to be done manually afterwards and to prevent a lot of confusion.
@kurzdev do you want to PR this small change? I mean in the Dockerfile, not the compose.
@pierreozoux Sure, do you want me to just edit the template Dockerfiles or the Dockerfiles for versions 19.0, 20.0 and 21.0 as well?
I implemented @QuAzI's method of doing things as it seems more appropriate for the general public to not set the locale more specific than it has to be. As I stated in the pull request, this works only on debian-based images.
Thanks a lot @kurzdev :)
@ricardojlrufino did https://github.com/docker-library/php/pull/1187 fix your issue?
LC_ALL=C.UTF-8 LANG=C.UTF-8
Old tweak (good to know, thanks @QuAzI https://github.com/nextcloud/docker/issues/721#issuecomment-616192895 Will try on my linuxserver.io dockerized NextCloud on ARM64 OpenWrt...
EDIT: Tested and fixed for me ! THANKS
I have the same problem, but I cant fix it editing my env.
Here is my Compose:
version: '2'
volumes: nextcloud: db:
services: db: image: yobasystems/alpine-mariadb:latest restart: always command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW volumes: - db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=HerePassword - MYSQL_PASSWORD=HerePassword - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud
app: image: nextcloud restart: always ports: - 8080:80 links: - db volumes: - nextcloud:/var/www/html - /media/raid/nextcloud/:/var/www/html/data environment: - MYSQL_PASSWORD= - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=db
I dont know how to fix it, I have it in OMV6 running on a Raspberry Pi 4 and I already set the locale.gen to de_DE.UTF-8, also the intl_defaults in php.ini. Still not able to sync files with ä ö ü characters in it.