Why can't Platformio set the locale?

You don’t have that particular locale available on your system, shell tries to switch to it but it’s not present. Enable it first and it will be generated (eg. in terminal sudo dpkg-reconfigure locales on Debian-like systems and check at least en_US-utf8 in addition all others that apply).

Thanks my dude, I’ll attempt this when I get home.

This is a bug/feature of PIO IDE 2.0. Please file an issue here and we will improve it.

PIO IDE automatically sets locale encoding to UTF-8. This is a solution for