From: thomas dot jarosch at intra2net dot com
Operating system: Linux
PHP version: 5.2.6
PHP Bug Type: Strings related
Bug description: escapeshellarg removes UTF-8 multi-byte characters
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 bug report at http://bugs.php.net/?id=44945&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44945&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44945&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44945&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44945&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44945&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44945&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44945&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44945&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44945&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44945&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44945&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44945&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44945&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44945&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44945&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44945&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44945&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44945&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44945&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44945&r=mysqlcfg