PTFM-11008 Better encoding handling on pypy/pip installations.