php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: email at steffenweber dot net
New email:
PHP Version: OS:

 

 [2008-03-29 09:52 UTC] email at steffenweber dot net
Description:
------------
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) "''"

Patches

Pull Requests

History

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] felipe@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Mar 11 19:01:31 2025 UTC