The GNU/Linux terminal doesn't display Swedish characters (sv_SE.UTF-8). I've googled, and found several sources with various solutions.

To summarize the error, no matter what guide I follow, is that I get a variation of this: "locale: Cannot set LC_ALL to default locale: No such file or directory".

I'm using Raspbian (Debian 9)

The one thing that worked was:

sudo locale-gen 
sudo dpkg-reconfigure locales

However, when rebooting, I'm back at the terminal not being able to display Swedish characters.

  • which terminal?
    – thrig
    Aug 11 '18 at 15:11
  • A question that talks about a terminal (albeit without identifying which one) not displaying characters and then mentions nothing at all about the configuration of the terminal.
    – JdeBP
    Aug 11 '18 at 19:01

I had similar problem with Ukrainian language. Execute


and check LC_ALL= variable, probably it's just empty.

The workaround can be pretty simple:

sudo update-locale LC_ALL=sv_SE.UTF-8 LANG=sv_SE.UTF-8

Check content of the /etc/default/locale file afterwards, it should be


If nothing helps, just add this lines manually to the file /etc/default/locale.

Finally reboot your computer.

  • dpkg-reconfigure locales is supposed to do that (when it asks what the default locale should be). Aug 11 '18 at 16:51
  • Supposed and does are two different things, especially in Linux.
    – ajeh
    Aug 11 '18 at 18:40

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.