Encode env variabels as UTF8 strings. That's what popen needs