Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale problem and support for UTF-8 file names #721

Open
ricardojlrufino opened this issue Apr 22, 2019 · 9 comments
Open

Locale problem and support for UTF-8 file names #721

ricardojlrufino opened this issue Apr 22, 2019 · 9 comments
Labels
bug needs review Needs confirmation this is still happening or relevant upstream

Comments

@ricardojlrufino
Copy link

ricardojlrufino commented Apr 22, 2019

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?

@QuAzI
Copy link

QuAzI commented Apr 19, 2020

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.

@kurzdev
Copy link

kurzdev commented Mar 22, 2021

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.

@pierreozoux
Copy link
Member

pierreozoux commented Mar 23, 2021

@kurzdev do you want to PR this small change?
I mean in the Dockerfile, not the compose.

@kurzdev
Copy link

kurzdev commented Mar 24, 2021

@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?

@kurzdev
Copy link

kurzdev commented Mar 25, 2021

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.

@pierreozoux
Copy link
Member

Thanks a lot @kurzdev :)

@J0WI
Copy link
Contributor

J0WI commented Aug 27, 2021

@ricardojlrufino did docker-library/php#1187 fix your issue?

@erdoukki
Copy link

erdoukki commented Jun 12, 2022

Capture d’écran du 2022-06-12 18-07-45

LC_ALL=C.UTF-8 LANG=C.UTF-8

Old tweak (good to know, thanks @QuAzI #721 (comment)
Will try on my linuxserver.io dockerized NextCloud on ARM64 OpenWrt...

EDIT:
Tested and fixed for me ! THANKS

@Zeroth42
Copy link

Zeroth42 commented Jul 8, 2023

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.

@joshtrichards joshtrichards added the needs review Needs confirmation this is still happening or relevant label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs review Needs confirmation this is still happening or relevant upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants