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

Inconsistent locale in geonode container #464

Closed
etj opened this issue Aug 18, 2023 · 1 comment · Fixed by #465
Closed

Inconsistent locale in geonode container #464

etj opened this issue Aug 18, 2023 · 1 comment · Fixed by #465
Assignees

Comments

@etj
Copy link
Contributor

etj commented Aug 18, 2023

Within the docker container the locale settings are set this way

LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

and this may cause problems when geonode needs to deal with non-ascii characters (we got errors when an avatar had the jpg file containing a "ö".

We need to set a proper encoding.

@etj etj self-assigned this Aug 18, 2023
@etj etj linked a pull request Aug 18, 2023 that will close this issue
@etj
Copy link
Contributor Author

etj commented Sep 13, 2023

In a server we got:

geonode=# select * from avatar_avatar where user_id = 1089;
 id | primary |                     avatar                     |        date_uploaded         | user_id 
----+---------+------------------------------------------------+------------------------------+---------
 10 | t       | avatars/JohanXXXXXXXXXX/kuva_työhakemukset.jpg | 2022-10-12 09:28:20.74668+00 |    1089
(1 row)

This is how the file looked in the host (ok):

root@geonode-11:/srv/utu-geonode# ll /var/lib/docker/volumes/utugeonode-statics/_data/uploaded/avatars/JohanXXX
total 800
drwxr-xr-x  3 root root   4096 loka   12  2022 ./
drwxr-xr-x 13 root root   4096 helmi  18 12:21 ../
-rw-r--r--  1 root root 805437 loka   12  2022 kuva_työhakemukset.jpg
drwxr-xr-x  6 root root   4096 loka   12  2022 resized/
root@geonode-11:/srv/utu-geonode#

This is how the file looked in the container (broken):

root@596f4fc93a49:/usr/src/utu_geonode# ll /mnt/volumes/statics/uploaded/avatars/JohanXXX
total 800
drwxr-xr-x  3 root root   4096 Oct 12  2022  ./
drwxr-xr-x 13 root root   4096 Feb 18 10:21  ../
-rw-r--r--  1 root root 805437 Oct 12  2022 'kuva_ty'$'\303\266''hakemukset.jpg'
drwxr-xr-x  6 root root   4096 Oct 12  2022  resized/
root@596f4fc93a49:/usr/src/utu_geonode# 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant