You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not really sure if this is intended behaviour but when using mix releases in elixir 1.9 any strings fetched from the Application config, whether you use the new Config module or not, seem to copy not as utf8 strings.
I can confirm this didn't happen with distillery releases on 1.8.1, and it doesn't happen if you use elixir 1.9 and do iex -S mix locally. However if you use a mix release it will happen.
This is causing an issue because some of our config contains this string: £. In the old world this would become the valid utf8 binary:
<<194,163>>
and everything works. But with 1.9 and releases this becomes:
<<163>>
Which means if we try to encode it with Jason, e.g., it blows up and breaks things.
I have made a repo with a minimal test case here: https://github.com/Adzz/minimal if you clone and make a release, start_iex then run the function you'll see the invalid string. If you boot with iex -S mix instead you will see the difference.
We can fix our issue by getting rid of that config, but now I am concerned about other bits of config changing.
Expected behavior
I guess the strings become valid utf8 strings?
The text was updated successfully, but these errors were encountered:
Environment
Current behavior
I'm not really sure if this is intended behaviour but when using mix releases in elixir 1.9 any strings fetched from the Application config, whether you use the new
Config
module or not, seem to copy not as utf8 strings.I can confirm this didn't happen with distillery releases on 1.8.1, and it doesn't happen if you use elixir 1.9 and do
iex -S mix
locally. However if you use a mix release it will happen.This is causing an issue because some of our config contains this string:
£
. In the old world this would become the valid utf8 binary:and everything works. But with 1.9 and releases this becomes:
Which means if we try to encode it with Jason, e.g., it blows up and breaks things.
I have made a repo with a minimal test case here: https://github.com/Adzz/minimal if you clone and make a release,
start_iex
then run the function you'll see the invalid string. If you boot withiex -S mix
instead you will see the difference.We can fix our issue by getting rid of that config, but now I am concerned about other bits of config changing.
Expected behavior
I guess the strings become valid utf8 strings?
The text was updated successfully, but these errors were encountered: