1--TEST-- 2Bug #75574 putenv does not work properly if parameter contains non-ASCII unicode character, UTF-8 3--SKIPIF-- 4<?php 5 6if (substr(PHP_OS, 0, 3) != 'WIN') { 7 die("skip Valid only on Windows"); 8} 9include "skipif.inc"; 10?> 11--FILE-- 12<?php 13/* 14#vim: set fileencoding=utf-8 15#vim: set encoding=utf-8 16*/ 17 18include "include.inc"; 19 20$php = get_cgi_path(); 21reset_env_vars(); 22 23$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()); 24file_put_contents($fn, "<?php\nvar_dump(putenv('FOO=啊'));\n//var_dump(`echo %FOO%`);\nvar_dump(getenv('FOO'));"); 25 26echo shell_exec("$php -n -f $fn"); 27 28unlink($fn); 29 30?> 31===DONE=== 32--EXPECT-- 33bool(true) 34string(3) "啊" 35===DONE=== 36