Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can't type åäö on the command line when ssh'ing to a Debian machine. It works locally though.

Changing 'Declare terminal as' to 'xterm-color' doesn't seem to help, either.

share|improve this question
add comment

5 Answers 5

up vote 7 down vote accepted

Edit /etc/ssh_config and comment out the line:

SendEnv LANG LC_*

This config change was introduced by Lion. See man ssh_config for more information on SendEnv.

Another alternative may be to modify the machines you're accessing, as described in grawity's answer.

A related thread on this topic: http://mod16.org/hurfdurf/?p=189

share|improve this answer
add comment

Make sure the remote machine has correct locale settings:

  1. the value of $LANG (or $LC_CTYPE) should be an UTF-8 locale (en_US.utf-8 for example); on Debian, the default value is set in /etc/default/locale

  2. the chosen locale should be listed in locale -a – if not, edit /etc/locale.gen and run locale-gen.

share|improve this answer
    
This worked before Lion though, so I'm guessing the problem is on my side. But I'll double check. –  Jonatan Littke Jul 26 '11 at 12:22
    
locale-a gives me: locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_COLLATE to default locale: No such file or directory –  Jonatan Littke Jul 28 '11 at 11:54
    
locale-gen is not a command, only a manpage, not sure what to run. –  Jonatan Littke Jul 28 '11 at 11:55
    
@Jonatan: You might need the locales package on Debian. –  grawity Jul 28 '11 at 12:22
    
Already installed: cl.ly/8zrl –  Jonatan Littke Aug 3 '11 at 9:58
show 1 more comment

I had to comment out the line SendEnv LANG LC_* in /etc/ssh_config on a clean install of OS X Lion in order to get åäö to work on remote machines.

Just to make Google users happy: many of you probably want to configure this to make Irssi on remote servers work with special characters like åäö on Mac OS X Lion.

share|improve this answer
    
That's what I meant to write, updated my answer, thanks. :) –  Jonatan Littke Aug 5 '11 at 11:05
add comment

Or even easier, you can uncheck the "Set locale environment variables on startup" setting in Terminal.app under Settings Windows > Settings Tab > Advanced and restart Terminal.app

share|improve this answer
add comment

I have added:

LC_CTYPE=en_US.UTF-8
LANG=POSIX

in .bash_profile located in my home folder.

share|improve this answer
2  
If you meant this as an answer can you explain how this answers the question? See the faq and tour pages for more information about how this site works. Thanks! –  Seth Mar 24 '13 at 19:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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