[1.7.x] Fixed #23291 -- Don't add Unicode varname/value to environment.

Windows doesn't like that and it causes 114 failures in the
admin_scripts tests with Python 2.x.

0bfb53866199f366ed140d49938fd185e5898156 from master.