When I run perl, I get the warning:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset
Export the variable
$ export LANGUAGE=en_US.UTF-8
$ export LC_ALL=en_US.UTF-8
$ export LANG=en_US.UTF-8
$ export LC_CTYPE=en_US.UTF-8
Next run
$ sudo locale-gen
$ sudo dpkg-reconfigure locales
When you run dpkg-reconfigure locales it asks you to choose the locales, choose en_US.UTF-8 . If you run this by selecting all locales, it will take some time to configure.