#26086 [Opn->Fbk]: Weird Output

From: Date: Mon, 03 Nov 2003 08:03:31 +0000
Subject: #26086 [Opn->Fbk]: Weird Output
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-49869@lists.php.net to get a copy of this message
 ID:               26086
 Updated by:       moriyoshi@php.net
 Reported By:      mite_tea_big at hotmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Output Control
 Operating System: Windows XP
 PHP Version:      4.3.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


Previous Comments:
------------------------------------------------------------------------

[2003-11-02 17:47:29] mite_tea_big at hotmail dot com

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 this bug report at http://bugs.php.net/?id=26086&edit=1


Thread (3 messages)

« previous php.bugs (#49869) next »