You are not logged in.

#1 2016-11-25 14:43:43

Foretsauvage
Member
Registered: 2016-03-23
Posts: 20

Special character in file path

Hello all,

I am currently unable to open files that have special caracters in their paths or names. éàêçôîè

I know it would be best simply not to use these but we are 6 adults at home using an owncloud server and I can't go around obligating them to not use these characters. They are either using debian or ubuntu.

I have been at that problem on and off for a while and haven't found anything to fix this in other threads.

I was using KDE up until this morning and thought that the locale might be overrided by some .config files. I uninstalled KDE, deleted old .config files and migrated towards Xfce. This has not helped.

I have played around with the locales : en_US.UTF-8, fr_CA, fr_CA.UTF-8, fr_CA.ISO-8859-1

The current output for locale is :

LANG=fr_CA.UTF-8
LC_CTYPE="fr_CA.UTF-8"
LC_NUMERIC="fr_CA.UTF-8"
LC_TIME="fr_CA.UTF-8"
LC_COLLATE="fr_CA.UTF-8"
LC_MONETARY="fr_CA.UTF-8"
LC_MESSAGES="fr_CA.UTF-8"
LC_PAPER="fr_CA.UTF-8"
LC_NAME="fr_CA.UTF-8"
LC_ADDRESS="fr_CA.UTF-8"
LC_TELEPHONE="fr_CA.UTF-8"
LC_MEASUREMENT="fr_CA.UTF-8"
LC_IDENTIFICATION="fr_CA.UTF-8"
LC_ALL=

locale -a

C
en_US.utf8
fr_CA
fr_CA.iso88591
fr_CA.utf8
POSIX

Offline

#2 2016-11-26 14:35:23

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,302

Re: Special character in file path

Foretsauvage wrote:

I am currently unable to open files that have special caracters in their paths or names. éàêçôîè

What command do you use to open the files?
What error message does it produce?

When you run 'ls' on the file in a terminal, are the characters showed?

Try that in graphical environment and also in a virtual console outside graphical environment.

The best approach is to configure everything (locale, DE or WM, every program) to use UTF8 only, and you should not encounter any problem.
Of course you need good fonts, rich enough to know the international characters. Tell what fonts you use.

Last edited by berbae (2016-11-26 14:36:02)

Offline

#3 2016-11-26 22:06:25

Foretsauvage
Member
Registered: 2016-03-23
Posts: 20

Re: Special character in file path

I open the files from the file manager.

The error message I get is :
Failed to open file '/home/1234/Serveur/Docs/Comit%C3%A9s%20et%20dossiers/Plans%20et%20construction/GANTT_Grange.planner': No such file or directory

So the accents show up in the terminal but not the underscores.

[blackcat@lamachine ~]$ ls /home/1234/Serveur/Docs/Comités\ et\ dossiers/Plans\ et\ construction/GANTT_Grange.planner 

The ISO and the one simply called fr_CA locale was tried as a fix to this problem as it was suggested is various other threads

I am currently using Sans, in KDE I was using Noto Sans, but I tried changing the fonts to arial without any effect.

If this detail might help, I am unable to une this special character : ôîâêûŷ in Libre office. All the others work properly.

Ill go see in the wiki how to set application specific locales.

Offline

#4 2016-11-26 22:28:30

Foretsauvage
Member
Registered: 2016-03-23
Posts: 20

Re: Special character in file path

For some reason the output for locale has changed. LANG=C now instead of fr_CA.UTF-8 :

LANG=C
LC_CTYPE="fr_CA.UTF-8"
LC_NUMERIC="fr_CA.UTF-8"
LC_TIME="fr_CA.UTF-8"
LC_COLLATE="fr_CA.UTF-8"
LC_MONETARY="fr_CA.UTF-8"
LC_MESSAGES="fr_CA.UTF-8"
LC_PAPER="fr_CA.UTF-8"
LC_NAME="fr_CA.UTF-8"
LC_ADDRESS="fr_CA.UTF-8"
LC_TELEPHONE="fr_CA.UTF-8"
LC_MEASUREMENT="fr_CA.UTF-8"
LC_IDENTIFICATION="fr_CA.UTF-8"
LC_ALL=

Also the output of locale and the contents of /etc/locale.conf dont reflect one another.

I also noticed that under /home/1234/.config there were no locale.conf file so I created it.

Offline

#5 2016-11-26 23:07:21

Foretsauvage
Member
Registered: 2016-03-23
Posts: 20

Re: Special character in file path

So after some tinkerring I can now get LibreOffice to open files with special characters in its name or path. Libre office is however unable to produce those characters in the window's title.

However the file I am trying to open uses the programme called Planner. It is a gconf app. That program is still unable to open files with special characters. I have tried moving the file to an other collection andf it works perfectly. However on the server it wont open.

Offline

#6 2016-11-27 08:42:44

alex.theoto
Member
From: Athens Greece
Registered: 2014-11-30
Posts: 307

Re: Special character in file path

Are these files on shared server_computer?
If so, how do they share them? (samba, nfs)

Offline

#7 2016-11-27 12:23:58

seth
Member
Registered: 2012-09-03
Posts: 49,966

Re: Special character in file path

Try to run

planner '/home/1234/Serveur/Docs/Comités et dossiers/Plans et construction/GANTT_Grange.planner'

and

planner '/home/1234/Serveur/Docs/Comit%C3%A9s%20et%20dossiers/Plans%20et%20construction/GANTT_Grange.planner'

from konsole.
I assume the former works and the latter doesn't.

It seems the ominous "file manager" (dolphin?) encodes the filename as URL but passes (as requested by the planner desktop service) a file. You could try altering /usr/share/applications/planner.desktop to be opened with "planner %U" instead of "planner %F" but it likely cannot handle even file:// uris.

Offline

Board footer

Powered by FluxBB