ID: 14935 Updated by: elixer Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem PHP Version: 4.1.1 New Comment:
The problem is that "space characters" in the example code is not meant to refer to specifically a space (ASCII 32) it is referring to tab, vertical tab, carriage return, line feed, etc. Basically all of the [:space:] characters except for an actual ASCII 32 space. This is expected behavior, you don't have to escape ASCII 32 in C strings. The documentation fix is still lacking. The line in the example code should read: // All upper and lower-case letters will be escaped // ... but so will the [\]^_` and any tabs, line // feeds, carriage returns, etc. Instead of the current (CVS): // All upper and lower-case letters will be escaped // ... but so will the [\]^_` Or something along those lines. I'll commit that later tonight unless someone objects or has better verbage. Previous Comments: ------------------------------------------------------------------------ [2002-01-10 02:06:55] [EMAIL PROTECTED] We should probably take a closer look at this problem. I verified that addcslashes had the currently documented behaviour a while ago. If it has changed, we have a problem. ------------------------------------------------------------------------ [2002-01-09 21:09:38] [EMAIL PROTECTED] Confirmed, will fix in CVS. Status -> Closed ------------------------------------------------------------------------ [2002-01-08 15:24:48] [EMAIL PROTECTED] http://www.php.net/manual/en/function.addcslashes.php says `and space characters' but this is not true; on my system addcslashes('foo[ ]','A..z') results in \f\o\o\[ \] not \f\o\o\[\ \] ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14935&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]