Living with a Snow Lion – Part 2

Life goes on with the new cat on my laptop, and now I’ve stumbled across a strange issue. When SSH’ing to one of my servers, my favorite editor, vim, stopped working with this rather puzzling error:

Error detected while processing /home/hc/.vimrc:
line  106:
E474: Invalid argument: listchars=tab:»?~@?,trail:·,eol:¶
Press ENTER or type command to continue

The problematic line above is part of my new, delicious editor configuration which should make my editor look something like this:

I’m not sure why, but I tried running locale on my server, and got this somewhat puzzling output:

$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Obviously something was wrong with my locale, and after a little Googling I came across this page where the author suggests to comment out the SendEnv LANG LC_* line in /etc/ssh_config like this:

Host *
#   SendEnv LANG LC_*
#   ForwardAgent no

The argument for this was that the locale environment variables on Show Lion are somehow broken, or at least not compatible with their Linux counterparts. I tried, and everything worked like it was supposed to. The reason for the vim error was probably the use of UTF8 characters as a part of the listchars parameter. The erroneous locale broke UTF8, making this configuration unparsable.

Posted Tuesday, October 9th, 2012 under Uncategorized.

Leave a Reply

You must be logged in to post a comment.