Wrong encoding in macos build


I am currently trying to get our Cordova app to build on CircleCI 2.0. I have a workflow-based config, with multiple paths. One of them builds on a macos machine. However, the bash output seems to be wrongly encoded there. Normally, this would only be annoying, but it breaks when I try to do

The error already manifests in the checkout step, where I get an output like this:

^D^DCloning into '.'...

I then really breaks here:

#!/bin/bash -eo pipefail
echo "ruby-2.4" > ~/.ruby-version

My config for that step is:

defaults: &ios
  working_directory: ~/ios
    xcode: "9.2.0"

      <<: *ios
        - checkout
        - run:
            name: Set Ruby Version
            command:  echo "ruby-2.4" > ~/.ruby-version

Any ideas about what the problem could be?