3

I have an issue regarding neomutt not displaying the Swedish characters å, ä and ö.

When typing locale in the terminal I get:

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

When viewing the subject text in neomutt I get an question mark whenever it should be a character å, ä or ö. When I open an email I get \366 instead of ö, \345 instead of å and \344 instead of ä.

I'm using 5.0.7-arch1-1-ARCH.

8
  • what is the output of locale charmap ? Commented Apr 19, 2019 at 19:00
  • octal 366 is the iso8859-1 encoding of ö, not the UTF-8 encoding. Chances are those emails are not properly formatted. If you press h within neomutt when viewing that email, do you see a Content-Type header? What does it say for the charset? Commented Apr 19, 2019 at 19:52
  • 1
    Finally found the solution. My initial setting of LC_COLLATE=sv_SE.UTF-8 didn't work as it should've, I had to set it to sv_SE.utf8. So now the characters in the email body text works but I still can't see the correct characters in the subject text when viewing all the emails. Commented Apr 20, 2019 at 6:24
  • 1
    Also found the solution to the issue with my subject text. I tried sending myself a email with åäö and it showed up in my subject text. I found it weird because all my other mail didn't show those characters in it's subject text. I therefore tried refreshing my cache to see if it was because they were stored differently, which it did. Everything seems to be working now! Commented Apr 20, 2019 at 6:41
  • 2
    @RamoMislimi You should submit you findings and solution as an answer (and later accept that answer). Doing so would benefit people with the same issue as you. You should also mention (in the question) what Unix you are using as locale names may differ between Unices. Commented Apr 20, 2019 at 8:08

1 Answer 1

1

The solution was to change the incorrect locale settings. Initially when I did set up my locales I enteret the same locale name that was found in /etc/locale.gen, which was sv_SE.UTF-8.

When you uncomment the locale of your choice in /etc/locale.gen you have to run locale-gen which is a program that reads locale.gen and generates localisation files. The available ones can now be found by running locale -a in the terminal.

When I ran locale -a I noticed that the sv_SE.UTF-8 wasn't an option, but sv_SE.utf8 was. What I then had to do was change my locale configurations in /etc/locale.conf and make sure that LC_COLLATE was set to sv_SE.utf8 instead of sv_SE.UTF-8. After doing this the new settings will be applied after reboot of the machine. You can also change the locale temporarily by running export LC_COLLATE=sv_SE.utf8 and then try to run neomutt to confirm that the correct characters are shown.

Efter you've rebooted your machine you can run locale to check if the locales has been changed.

Another solution is to add export LC_*=sv_SE.utf8 in your profile file that is being executed whenever you open a new terminal window.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.