You are not logged in.

#1 2017-02-09 21:15:40

vega
Member
Registered: 2008-06-26
Posts: 13

Problem with greek filenames and locales

In my graphical file manager, everything looks normal. The directory /home/nikos contains
some files with greek names which appear fine.

When trying to open such a document with Libreoffice 5.3.0.3, it does not open,
but I get an error window stating:

/home/nikos/Μανιταρια Εποχη.ods does not exist
or for some files
/home/nikos/(garbled characters).odt does not exist

In reality, the file does exist. If I rename a file to use only latin characters, libreoffice can then open it. However, a greek-named image file (.png) can be viewed in the image viewer without needing to be renamed.

But if I go to a terminal, filenames do not appear correctly.

nikos@computer:~$ ls
'?-?????"?????E ???"?E?????"????????????.odt'
 test-mic.wav
''$'\316\210\316\263\316\263\317\201\316\261\317\206\316\261'
''$'\316\221\316\240\316\237\316\224\316\225\316\231\316\236\316\225\316\231\316\243'
''$'\316\221\316\272\316\271\316\275\316\267\317\204\316\261''.ods'

nikos@computer:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=el_gr.utf8
LC_CTYPE="el_gr.utf8"
LC_NUMERIC="el_gr.utf8"
LC_TIME="el_gr.utf8"
LC_COLLATE="el_gr.utf8"
LC_MONETARY="el_gr.utf8"
LC_MESSAGES="el_gr.utf8"
LC_PAPER="el_gr.utf8"
LC_NAME="el_gr.utf8"
LC_ADDRESS="el_gr.utf8"
LC_TELEPHONE="el_gr.utf8"
LC_MEASUREMENT="el_gr.utf8"
LC_IDENTIFICATION="el_gr.utf8"
LC_ALL=

nikos@computer:~$ localectl  
   System Locale: LANG=el_gr.utf8
       VC Keymap: n/a
      X11 Layout: n/a

nikos@computer:~$ cat /etc/locale.gen
el_GR.UTF-8 UTF-8  
el_GR ISO-8859-7  
en_US.UTF-8 UTF-8  
en_US ISO-8859-1
nikos@computer:~$ mount | grep /home
/dev/sdb4 on /home type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)

When I type greek characters in my terminal (LXTerminal), questionmarks appear instead of letters.
My terminal font in the configuration of LXTerminal is unicode aware and greek appears
in the configuration window.

The filesystem is btrfs as I showed above, I did not find any
options to specify to how to mount it, regarding the encoding. This /home
partition comes from a previous Debian installation, where it still works
normally.

Last edited by vega (2017-02-09 21:16:31)

Offline

#2 2017-02-09 21:58:49

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: Problem with greek filenames and locales

What is the contents of /etc/locale.conf also what is the output of

$ locale -a

Edit:
removed command for inspecting /etc/locale.gen as already provided

Last edited by loqs (2017-02-09 22:31:19)

Offline

#3 2017-02-09 22:27:59

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: Problem with greek filenames and locales

How do you open it with LibreOffice?

Offline

#4 2017-02-09 22:42:03

vega
Member
Registered: 2008-06-26
Posts: 13

Re: Problem with greek filenames and locales

@Steef435 I (try to) open with LibreOffice by clicking on the icon in the file manager. But I have some news, in that with my other user, everything works (terminal, Libreoffice and everything). Now, I don't know why the difference, but the output of locale is different for the other user: The first three lines:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

do not appear for that user. I cannot find any files in ~/.config/locale.conf for any of the two users. I should maybe just delete any personalised configuration files I can find.

Last edited by vega (2017-02-09 23:01:06)

Offline

#5 2017-02-13 22:10:19

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: Problem with greek filenames and locales

Sorry for the late reply.

It would be good to look at the "locale -a" output as loqs suggested. Also, please give us the full output of locale for the user where it did work.

Could there by a Desktop Environment influencing your settings? The variables are just environment variables anyway, so they could be set practically anywhere (someone's .bashrc for instance)

Locale's aren't really my thing so I'm not sure whether the setting is case-sensitive, but the locale should be called el_GR.utf8 instead of el_gr.utf8, you could try if that does anything.

Last edited by Steef435 (2017-02-13 22:11:17)

Offline

#6 2017-02-13 22:44:34

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Problem with greek filenames and locales

Shouldn't you have LC_whatever=el_GR.UTF-8 instead of LC_whatever=el_gr.utf8? Note the dash and uppercase. I'm not sure if the UTF part really needs to be uppercase but I think I've seen people have problems before by not including the dash between utf and 8.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2017-02-14 13:17:36

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Problem with greek filenames and locales

What R00KIE said.
In doubt post outputs of

localectl
locale
locale -a
cat /etc/locale.conf

Offline

Board footer

Powered by FluxBB