Recommend this page to a friend!

      DBF Class  >  All threads  >  Bugfix  >  (Un) Subscribe thread alerts  
Summary:Field Names Reading every NonZero field
Author:Marco B.
Date:2013-05-14 13:58:26
Update:2013-06-21 11:09:51

  1. Bugfix   Reply   Report abuse  
Marco B. - 2013-05-14 13:58:26
Hi, nice (and usefull) class.
BTW I had a problem with some dbf produced by the ancient Clipper.
It's not your fault.

The Field Names should be zero-filled but, sometimes, are null terminated (with "garbage" after the first '\x00'), this is your loop:

for($k=$beg; $k<$beg+11; $k++){
$name .= $this->_raw[$k];

I had to change it in:
for($k=$beg; $k<$beg+11 && ord($this->_raw[$k])!=0; $k++){
$name .= $this->_raw[$k];

  2. Re: Bugfix   Reply   Report abuse  
Faro K Rasyid - 2013-06-21 11:09:51 - In reply to message 1 from Marco B.
Hi, thx for the fix, i'm glad when the class is useful for everybody


For more information send a message to info at phpclasses dot org.