On my laptop I have Linux Mint 18.3 installed and right now I am experiencing the following problem:
As a German I happen to have some files (or directories) that contain umlauts in their names (which in itself is not the problem). If I now try to open those files (e.g. PDFs) that either contain an umlaut or are located in a (sub-)directory whose name contains an umlaut it won't open.

For example I have a directory named Übungsblätter and somewhere in that dir I have a few PDF files. If I try to open one of those files from the file manager Okular will tell me it can't open .../Ãbungsblätter/... which shows me that it messed up the path by replacing the umlauts with some weird characters.

However if I have Okular opened and use its menu to open the respective file everything works like charm so the problem does only occur when trying to open the files from my file manager (Dolphin).

Furthermore I experienced that I can't type in umlauts in my terminal. I found this question dealing with that specific problem and I hoped that would fix the file-issue as well. However that was not the case although I am now able to type in umlauts in the terminal (though when typing in an umlaut it will insert two characters. For example when typing in ö it will insert the two characters \udcc3\udcb6 (found out by typing in ö and hitting return afterwards). It does get displayed as a single ö though but I have to explicitly delete two characters in order for the command line to be empty again.

Here's the output of locale:

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

I just found out that when opening the respective PDF from the terminal it will also error in a similar way as when opening from the file manager but this time it says it can't open .../bungsbltter/... (It completely removes the umlauts)

Output of locale -a:



  • 1
    Your locale output shows an error. Maybe it helps to set it up: Arch wiki: locale. Debian provides a package locales-all to make things easier, may help you, too. – mviereck Feb 22 '18 at 16:38
  • can you try running: sudo locale-gen "de_DE.UTF-8" - followed by: sudo dpkg-reconfigure locales - and see if locale still complains afterwards? – canofcolliders Feb 22 '18 at 16:45
  • Still complains... And locale -a still doesn't display the de_DE.UTF-8 – Raven Feb 22 '18 at 16:56
  • @mviereck I tried but I don't even have an idea where to start... Even the linked wiki page didn't help me because I have no idea where a directory-error could come up in that context. – Raven Feb 22 '18 at 17:07
  • can you try exporting them temporarily before reconfiguring, then logging out and back in (for a reload) and see if that sticks? "export LANG=de_DE.UTF-8; export LANGUAGE=de_DE.UTF-8; export LC_ALL=de_DE.UTF-8; locale-gen de_DE.UTF-8; dpkg-reconfigure locales" – canofcolliders Feb 22 '18 at 17:14

I see some confusion in the locale settings.

One point is: A mix of de_DE, en_US and en_GB.

The other point is: some locales are declared with .utf8, other with .UTF-8. Though it should mean the same, it may cause trouble.

The error message Cannot set LC_ALL to default locale: No such file or directory is probably because of missing en_US.UTF-8 in locale -a (that has en_US.utf8 instead), but it is declared in /etc/default/locale.

I am a bit confused to see LANG=de_DE.UTF-8 in the output of locale although it is not defined in /etc/default/locale and there is no /etc/locale.conf. Maybe a setting from the desktop environment that overwrites system settings? Or in ~/.bashrc? Also check whether you have a ~/.config/locale.conf. More possible locations where environment variables can be set are listed in Arch wiki. Find out where LANG=de_DE.UTF-8 is set and remove that.

I think the best way is to set everything to german locales. Your locale -a shows installed locales on your system. One of them is de_DE.utf8.

The core setting is in /etc/default/locale. You can edit that manually and I think its content should be just LANG=de_DE.utf8 and nothing else. You can edit the file yourself, or use a tool for this:

update-locale --reset LANG=de_DE.utf8

To keep the system in english, but have umlauts too, it may work to set the locale to en_US.utf8 that is listed in locale -a. utf8 should provide the umlauts, even though the language does not use them:

update-locale --reset LANG=en_US.utf8

Speak a prayer, reboot and check if all is right. If console works fine, but there is still something wrong in desktop environment, check your desktop settings GUI for language entries and set is to de_DE.utf8, too.

  • Thanks I'll try tomorrow! However: Wouldn't that then set my system's language to German? I'd like to keep my system English... – Raven Feb 23 '18 at 18:13
  • 1
    @Raven I've added a setting to keep the system in english. – mviereck Feb 24 '18 at 10:11
  • So I changed /etc/default/locale to LANG=en_US.utf8 and I removed a line from my ~/.profile file that set the de_DE.UTF-8 thing. However that didn't affect the output of locale after a reboot and when using update-locale --reset LANG=en_US.utf8 it tells me perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US", LC_ALL = (unset), LANG = "nds_DE.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). – Raven Feb 24 '18 at 15:05
  • 1
    Okay nvm: I got it working. I had to follow the instructions listed here and do a reboot after that. Then I was able to use update-locale --reset LANG=en_US.utf8 without it resulting in an error. However if I now use locale in the terminal it will tell me everything is set to nds_DE.UTF-8 (which I generated in the previously mentioned step) (except the LANGUAGE that is set to en_US. That seems a bit odd to me but as I said: It seems to be working now so I won't complain. – Raven Feb 24 '18 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.