Problems with nano and swedish characters like å, ä and ö.

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
I wonder, what could be the problem, when I use swedish characters in nano (ubuntu 18.04) everything goes crazy. In the picture, I have two identical lines, on the first line I place my marker over the first ö and types an a.
All the other ö there disappears replaced by a ? and the cursor goes away to the right many places as you see on the picture. Very odd.
What can be the problem. Difficult to edit swedish text as you can understand.
Also this: "skapa ta?^hvlingar ma?^jste" --- is really ---"skapa tävlingar måste"
 

Attachments

  • Skärmavbild 2021-06-17 kl. 14.22.17.png
    Skärmavbild 2021-06-17 kl. 14.22.17.png
    25.2 KB · Views: 303


some people i don't know why use vim to code html ; it wouldn't be my first choice nor nano. Isn't that a html or maybe php file with html that your showing to edit ?
 
What do you suggest to use for editor on a remote server in another city? Its not my own server I could equip with KDE and Kate or whatever. It's a serverpark remote server that I connect to with ssh through terminal. What's the alternative??
 
What do you suggest to use for editor on a remote server in another city?
vim because it's installed on most Linux distributions by default.
 
Which terminal are you using? The default one?

Check preferences and make sure it's UTF-8 in the compatibility tab.
 
vim because it's installed on most Linux distributions by default.
Which terminal are you using? The default one?
I'm using terminal in mac and it works perfect with nano on the mac itself and a local server here
But ssh into a remote server the national characters are all screwed up, in Vim:
dig sja?~Hlv under insta?~Hllningar fo?~Hr ditt konto. Va?~Hl inloggad it's å, ä and ö that's garbled.
Check preferences and make sure it's UTF-8 in the compatibility tab.
See above
 

Attachments

  • Skärmavbild 2021-06-17 kl. 20.56.34.png
    Skärmavbild 2021-06-17 kl. 20.56.34.png
    26.9 KB · Views: 264
vim because it's installed on most Linux distributions by default.
Tried vim but when entering å ä ö it adds a space after each every time.
like this:
ö ä ä ä ä ä ä ä ä ö ö ö ö
and I was typing öäääääääööö
 
My hunch is that it's a locale issue.
It might be, in my macbook:
LANG="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_CTYPE="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_ALL=

In my ubuntu (local) server:
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

In the problematic server:
LANG=en_US
LANGUAGE=en_US:
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

So, how do I change that?
 
I am not 100% sure how to fix it. I only use English. If I type in Spanish, I can do so because of my keyboard layout and it's never for any system functions.

I did find this for you:

 
Solved! I did this command:

export LC_ALL=sv_SE.utf8

and that seemed to fix it.

So now locale is: (and nano works fine with åäö)

LANG=en_US
LANGUAGE=en_US:
LC_CTYPE="sv_SE.utf8"
LC_NUMERIC="sv_SE.utf8"
LC_TIME="sv_SE.utf8"
LC_COLLATE="sv_SE.utf8"
LC_MONETARY="sv_SE.utf8"
LC_MESSAGES="sv_SE.utf8"
LC_PAPER="sv_SE.utf8"
LC_NAME="sv_SE.utf8"
LC_ADDRESS="sv_SE.utf8"
LC_TELEPHONE="sv_SE.utf8"
LC_MEASUREMENT="sv_SE.utf8"
LC_IDENTIFICATION="sv_SE.utf8"
LC_ALL=sv_SE.utf8

Thank you all! Have a nice day :)
 
Ha! I was pretty sure it'd end up being a locale issue.

Glad it's sorted.
 
Solved! I did this command:

export LC_ALL=sv_SE.utf8
Now that you mention it, that setting does look familiar, glad you figured it out yourself! :)
 

Members online


Top