Ruby:2.6.2 - Env variables encoding issue


I’ve been trying to move our teams build from the deprecated circleci/ruby image over to the new cimg/ruby, with the version being 2.6.2. When I push commits and the build executes it seems to fail at the tests, in particular what seems to happen is that the env variables are set but when it then fetches some env variables for checking values I get some type of encoding problem as it does not seem to handle Swedish characters well.
“Välkommen” → “VxC3\xlkommen”

I’ve tried changing the locale through the config.yml file but that does not seem to help, both through specifing LANG=sv_SE.UTF-8 under the docker image as well as using Bash commands such as:
locale-gen sv_SE.UTF-8
update locale

I’ve also tried forcing the encoding but that didn’t work either, checked that env file is UTF-8 as well to be sure.

I also got the following error message for some other tests “incompatible character encodings: UTF-8 and ASCII-8BIT”.

Anyone got any ideas on how I could go about solving this?