ENV ["VARIABLE"]. Encoding returns # <Encoding: ASCII-8BIT> when created when assigning a unicode string
I am using ENV ["VARIABLE"] inside my Rails app, which is set to a unicode string. In production (which is a docker container) this ENV ["VARIABLE"] is encoded in some way with Encoding:ASCII-8BIT
(although for example ENV ["PWD"] is encoded with Encoding:UTF-8
). At development
each coded using variable Encoding:UTF-8
. The ASCII-8BIT encoding prevents me from displaying the variable in the view. What is the reason? How can I fix it?
source share
No one has answered this question yet
Check out similar questions: