Set Locale to en_US.UTF-8 or similar variant

docker
circle.yml

#1

Hi, I am using my pipeline to build an elixir project. The job that is causing me problems is once where I am using mix commands and am getting the error: warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8

How do I go about setting the locale to be en_US.UTF-8 so that mix will stop giving me this warning?

Thanks in advance


#2

I can’t quite remember how to fix that exact error for elixir, but in our rails setup we got:

RUN sudo locale-gen en_US.UTF-8 \
    && sudo locale-gen en en_US en_US.UTF-8 \
    && sudo dpkg-reconfigure locales

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

#3

To solve my problem I set the LC_ALL to be C.UTF-8 which fixed the error, however if I ever convert it to use en_US.UTF-8 I will try out your solution, thank you


#4

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.