ID: 44945 User updated by: thomas dot jarosch at intra2net dot com Reported By: thomas dot jarosch at intra2net dot com Status: Open Bug Type: Strings related Operating System: Linux PHP Version: 5.2.6 New Comment:
Thanks, that seems to work. I've inspected the environment on the server and it contains a LANG="en_US.UTF-8" variable. Is there a way I can fix this/PHP autodetects it without touching every code using escapeshellarg()? Previous Comments: ------------------------------------------------------------------------ [2008-05-08 11:28:25] [EMAIL PROTECTED] Try with the code below (mandatory in the test): if (false == setlocale(LC_CTYPE, "UTF8", "en_US.UTF-8")) { die("skip setlocale() failed\n"); } ------------------------------------------------------------------------ [2008-05-08 11:08:27] thomas dot jarosch at intra2net dot com Description: ------------ Hello together, I'm seeing almost the same issue as #44564 after upgrading from PHP 5.2.5 to 5.2.6. If I execute the provided test code via php CLI, everything works as expected. Running the same code via mod_php inside Apache skips the UTF-8 multi-byte characters. I've looked at the ext/standard/exec.c code a bit and checked that my "config.log" in both PHP build directories contains "#define HAVE_MBLEN 1" so the call to php_mblen() should work. Any idea what that could be? One thing I noticed is that php_mblen() is a wrapper macro for mblen() or mbrlen() which features a slight difference in the return code (see -2 rc for details). Thanks, Thomas Reproduce code: --------------- var_dump(escapeshellarg('ä')); Expected result: ---------------- string(2) "'ä'" Actual result: -------------- string(2) "''" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44945&edit=1