How to fix a locale setting warning from Perl

Here is how to solve it on Mac OS X v10.7 (Lion) or Cygwin (Windows 10):

Add the following lines to your bashrc or bash_profile file on the host machine:

# Setting for the new UTF-8 terminal support in Lion
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8

If you are using Z shell (zsh), edit file zshrc:

# Setting for the new UTF-8 terminal support in Lion
LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8

Leave a Comment