From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.7
PHP version:      4.2.3
PHP Bug Type:     Feature/Change Request
Bug description:  Additional fscanf argument

Not sure if this was already considered, but I didn't see it documented
anywhere and thought it would be nice to have.  It doesn't state in the
documentation about the  maximum length of the string being  read can be,
nor do I know what it currenly is.  I think it's 1024.  I have a line in a
file that's 1630 characters long.  When a run the program with fscanf, it
obvisouly doesn't read the whole line.

For instance:

list($v1, $v2) = fscanf($pt, "%[^|]|%[^\n]\n");

The "\n" is never reached and the program breaks.

There is a work around, which would be to substitute the fscanf with
something like:

split("\|", fgets($pt, 8026));

So, I guess what I'm getting at is, is it at all possible to:

a) add a length the read to fscanf
or
b) update the documentation to show this limitation


Thanks For Listening,
Paul
-- 
Edit bug report at http://bugs.php.net/?id=20460&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20460&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20460&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20460&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20460&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20460&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20460&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20460&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20460&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20460&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20460&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20460&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20460&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20460&r=isapi

Reply via email to