Fixing “cannot change locale (UTF-8)” error

I am trying new way to fix the annoying “cannot change locale (UTF-8)” error, this error usually show when you login from your OSX to a Linux machine:

osx$ ssh ubuntu-server
Last login: Sat Mar  9 09:04:40 2013 from 10.10.12.16
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)
[rayed@ubuntu-server ~]$

The problem happens because OSX send LC_CTYPE environment variable when you connect through ssh, the solution is to ask OSX not to send these variables. This can be done by editing you ssh config file on you OSX and commenting the “SendEnv” variable:

    
osx$ sudo vi /etc/ssh_config
:
#SendEnv LANG LC_*
:

3 thoughts on “Fixing “cannot change locale (UTF-8)” error”

  1. Al-Salam Brother!
    Allah bless you for your helpful blog 🙂

    I read your post about WordPress Arabic support but I’m a amateur user of wp and can’t use this guides…

    I have a blog in Arabic-Persian language, but I want to use the english-dashboard.

    I start using the default wp theme “2011”, but all RTL post, have a title with LTR condition (Title: LTR | Content: RTL with plugins)

    How to set up the theme that all my posts (any posts) in Title and content will be RTL?

    Also can you help me via TeamViewer?

    Allah Bless
    Good bye

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.