daviddwlee84 / DevEnvPack

Bring my development environment everywhere. vim, tmux, bash, zsh, VSCode, docker, and so on.
1 stars 0 forks source link

solve locale problem #19

Open daviddwlee84 opened 3 years ago

daviddwlee84 commented 3 years ago

Triggered by Ctrl+r with fzf from MacOS through ssh to Ubuntu (but they are both English system)

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TERMINAL_VERSION = "3.3.12",
    LC_CTYPE = "UTF-8",
    LC_TERMINAL = "iTerm2",
    LC_NUMERIC = "en_US.UTF-8",
    LC_TIME = "en_US.UTF-8",
    LC_MONETARY = "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",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

Seems only need to add export LC_ALL="en_US.UTF-8" in .bashrc can solve this problem

daviddwlee84 commented 3 years ago

Problem is caused by

MacOS's /etc/ssh/ssh_config contains such lines

Host *
  SendEnv LANG_LC_*

Just delete or comment the SentEnv ... then the problem will be solved.