#19959 [Csd->Opn]: fgets, fgetc

From: Date: Mon, 11 Nov 2002 00:43:15 +0000
Subject: #19959 [Csd->Opn]: fgets, fgetc
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969349568@lists.php.net to get a copy of this message
ID: 19959 Updated by: philip@php.net Reported By: holliwell@gmx.net -Status: Closed +Status: Open Bug Type: Documentation problem Operating System: win32/linux PHP Version: 4.2.3 New Comment: The first post suggests fgetc() is binary safe, anyone know since when? Marking this as open until it's documented. Previous Comments: ------------------------------------------------------------------------ [2002-10-19 17:57:51] philip@php.net Is fgetc() binary safe now too? Only fgets() has been documented as such thus far. fgetc() lacks documention on the matter altogether. ------------------------------------------------------------------------ [2002-10-19 10:56:45] iliaa@php.net This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. fgets() is now binary safe in latest CVS. ------------------------------------------------------------------------ [2002-10-18 12:22:24] holliwell@gmx.net yes ------------------------------------------------------------------------ [2002-10-17 12:35:24] sniper@php.net I assume you have used 'rb' for mode in fopen..? ------------------------------------------------------------------------ [2002-10-17 12:07:02] holliwell@gmx.net Hi, maybe only a doc problem. fgetc seems to be binary safe, while fgets not. assume: fopen a lokal file, read it with fgetc or fgets, you'll get bogus results with fgets if the opened file contains \0 Friedhelm Betz ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19959&edit=1

« previous php.doc (#969349568) next »