#26086 [NEW]: Weird Output

From: Date: Sun, 02 Nov 2003 22:47:29 +0000
Subject: #26086 [NEW]: Weird Output
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-49859@lists.php.net to get a copy of this message
From: mite_tea_big at hotmail dot com Operating system: Windows XP PHP version: 4.3.3 PHP Bug Type: Output Control Bug description: Weird Output Description: ------------ I was trying out different methods to input data from a file. I was using file_get_contents to read a file, then echo to output the string. The thing is, it seems to be outputting extra characters, mostly asian characters. It looks as if the html tags and other text are being changed to "?". if I remove all other non-php text, the extra output does not show up. Reproduce code: --------------- <?php $data = file_get_contents("Library.txt"); echo $data; ?> <html> </html> text.txt -------- ABCDEFGHIJKLMONPQRSTUV Expected result: ---------------- ABCDEFGHIJKLMONPQRSTUV Actual result: -------------- ABCDEFGHIJKLMNOPQRSTUVWXYZ ¸ñÔ¡&#15980;&#2573;&#12092;¬’›I&#3390;&#3338; View Source ----------- ABCDEFGHIJKLMNOPQRSTUVWXYZ ????????? -- Edit bug report at http://bugs.php.net/?id=26086&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26086&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26086&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26086&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26086&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26086&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26086&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26086&r=support Expected behavior: http://bugs.php.net/fix.php?id=26086&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26086&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26086&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26086&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26086&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26086&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26086&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26086&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26086&r=float

« previous php.bugs (#49859) next »