ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#44945 [NEW]: escapeshellarg removes UTF-8 multi-byte characters
by Thomas Dot Jarosch At Intra2net Dot Com other posts by this author
May 8 2008 4:08AM messages near this date
#44946 [Com]: crashes in ini_set() | #44945 [Bgs]: escapeshellarg removes UTF-8 multi-byte characters
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
Thread:
Thomas Dot Jarosch At Intra2net Dot Com
Thomas Dot Jarosch At Intra2net Dot Com
jani
Thomas Dot Jarosch At Intra2net Dot Com
felipe

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved