|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44564 escapeshellarg removes UTF-8 multi-byte characters
Submitted: 2008-03-29 09:52 UTC Modified: 2008-03-30 12:18 UTC
From: email at steffenweber dot net Assigned: iliaa (profile)
Status: Closed Package: Strings related
PHP Version: 5.2.6RC3 OS: Gentoo Linux (x86_64)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: email at steffenweber dot net
New email:
PHP Version: OS:


 [2008-03-29 09:52 UTC] email at steffenweber dot net
In PHP 5.2.6 RC3 escapeshellarg removes UTF-8 multi-byte characters (well, to be honest I have only tested german umlauts) from the input. RC1 has worked fine. I suspect that the following entry in the NEWS file has something to do with this: "Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia, Stefan Esser)"

Reproduce code:
php -r "var_dump(escapeshellarg('?'));"

Expected result:
string(2) "'?'"

Actual result:
string(2) "''"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-29 09:57 UTC] email at steffenweber dot net
I should add that this has worked fine in RC1.
 [2008-03-30 12:18 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 17 08:03:36 2021 UTC