Elixir upgrade help - warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction

Hello,

I have upgraded Elixir version from 1.10 to 1.12.3 and erlang 22.2.6 to 23.3.4.18

.tool-version.ex

elixir 1.12.3-otp-23
nodejs 13.8.0

postgres 11.6
ruby 2.7.0
erlang 23.3.4.18

In my dev environment I can see below :

Erlang/OTP 23 [erts-11.2.2.17] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Elixir 1.12.3 (compiled with Erlang/OTP 23)

But when I deploy it in test environment, I can see below

Erlang/OTP 24 [erts-12.3.2.9] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [jit]

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 (which can be verified by running “locale” in your shell)
Interactive Elixir (1.12.3) - press Ctrl+C to exit (type h() ENTER for help)

Issue here is the OTP 24 is displaying in test environment and few dependencies are not working because of this. Please help to resolve this.

Depending on your OS, there are different commands to update the locale and then you need to set the appropriate environmental variables before startup.

$ locale-gen en_US.UTF-8
$ export LC_ALL=en_US.UTF-8

2 Likes