UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u20ac’ in position 44: ordinal not in range(128)

While trying to build Firefox from sources, I ran into this error almost immediately after typing ./mach build. It turned out I had my bash prompt reconfigured to a '€' rather than a '$' sign. Changing PS1 back to containing a '$' fixed the build.