My OS X (Mavericks) seems to be setting LC_CTYPE
environmental variable to UTF-8
by default.
How can I change the default? I need LC_CTYPE
to be en_US.UTF-8
.
There's a catch: I don't want to overwrite default with another value by using export LC_CTYPE=en_US.UTF-8
in my local .profile
or .bash_rc
. I'm interested in changing the default itself, at the very root wherever it comes from, so that it works without additional startup scripts (and also I'm curious what controls env vars in OS X :)
The reason I want to change it at the very source is that I want to be able to:
- launch remote shell quickly in iTerm2, which doesn't run local shell's (slow-ish) startup script
- have remote servers inherit my local
LC_
variables so that I have UTF-8 support on other machines without having to configure them specifically.
LC_CTYPE=en_US.UTF-8
doesn't overwrite anything. You always log into your shell via your $PATH. Otherwise you'd be presented withbash [version] #
as in recovery mode Terminal. Explicitly including this in your profile is equivalent to modifying the setting described in the answer below. The benefit of including it in your path is that is explicitly defines the ENV for $HOME. This is what you want.