Making Mosh work for OSX and FreeBSD

Like many others, it seems, I got the dreaded “mosh-server needs a UTF-8 native locale to run.” when trying to use mosh from my OSX laptop to my FreeBSD server.

I tried the stuff google suggested, but nothing worked. What eventually solved the problem for me was adding the following to .bash_profile on my OSX client:

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export MM_CHARSET=utf8
export LC_COLLATE=”en_US.UTF-8″
export LC_TIME=”en_US.UTF-8″
export LC_NUMERIC=”en_US.UTF-8″
export LC_MONETARY=”en_US.UTF-8″
export LC_MESSAGES=”en_US.UTF-8″

This entry was posted in FreeBSD, OSX and tagged , , , , , . Bookmark the permalink.