#34409 [Opn->Fbk]: concatenating a "\n" to a single character string produces incorrect output

From: Date: Wed, 07 Sep 2005 15:24:50 +0000
Subject: #34409 [Opn->Fbk]: concatenating a "\n" to a single character string produces incorrect output
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84636@lists.php.net to get a copy of this message
ID: 34409 Updated by: tony2001@php.net Reported By: dskiles at docfinity dot com -Status: Open +Status: Feedback Bug Type: Strings related Operating System: Windows XP sp2 PHP Version: 5.0.5 New Comment: Try this code: <?php var_dump("a\n"); var_dump("a\r\n"); ?> Previous Comments: ------------------------------------------------------------------------ [2005-09-07 17:21:04] dskiles at docfinity dot com Scott, I noticed that you were using a UNIX shell, so I fired up Cygwin and tried the same thing on my box. Cygwin: a b c d Windows Shell: ???? ------------------------------------------------------------------------ [2005-09-07 17:13:33] scottmacvicar at ntlworld dot com I can't reproduce this. [scott@devbox www]# php -v PHP 5.0.6-dev (cli) (built: Sep 5 2005 18:38:22) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies [scott@devbox www]# php bugtest.php a b c d ------------------------------------------------------------------------ [2005-09-07 16:28:39] dskiles at docfinity dot com I tried this with the latest CVS and got the same result. Single character strings: ???? MultiCharacter strings: aa bb cc dd Multiple Newlines: a b c d ------------------------------------------------------------------------ [2005-09-07 16:17:35] tony2001@php.net Works just fine here. Also, line endings on windows are \r\n, not \n. ------------------------------------------------------------------------ [2005-09-07 16:14:56] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip And can't you really come up with a shorter reproduce script? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34409 -- Edit this bug report at http://bugs.php.net/?id=34409&edit=1

« previous php.bugs (#84636) next »