Skip to main content

Encoding for file?



  • Chad Carlson

    Hi @ehmatthes ! Let me check on that - in the meantime, are you able to share the file with us?

  • Eric Matthes

    Sure, here’s a tiny repo with the file, and a Python file that reads the yaml file. The yaml file is only read if the utf-16 encoding is stated explicitly.

    The person was pushing from an Ubuntu WSL instance. I think this issue might be relevant, assuming Platform_sh requires config files to be in utf-8.

    Tomorrow I can use this config file in a test project and see what happens. Currently I’m expecting that push to fail, and if I then rewrite the file with an explicit utf-8 encoding I would expect the push to succeed.

  • Eric Matthes

    I posted a repo demonstrating that Platformsh requires config files to have a UTF-8 encoding. More specifically, deployment fails with a UTF-16 encoding, and then succeeds after a conversion to UTF-16 encoding.

    • Clone project, run script to ensure UTF-16 encoding, commit changes.
    • Create Platformsh project
    • Run ‘platform push’, deployment fails.
    • Run script to set encoding to UTF-8, commit changes.
    • Run ‘platform push’, deployment succeeds.

    Is it a documented requirement that config files have a UTF-8 encoding?

    (I’m aware enough of encoding issues to sort them out when I encounter them, but I don’t have a deep enough understanding to know whether it would make sense to accommodate encodings other than UTF-8 in config files.)


Please sign in to leave a comment.