Just to add onto the conversation, I had a friend trying to run a data parsing script built for textscan in MATLAB and it wouldn't work in octave. The data file was a mess so I never got around to paring it down to a minimal, sharable example to post to the group.
The symptom was that a portion of the text file would cause Octave to advance farther than MATLAB. I don't know if the culprit was textscan or fgetl, but octave would hit EOF before MATLAB and throw a parsing error. Some code stepping showed after some part of the file that octave's file location counter would jump to a much higher value than in MATLAB.
I don't have either program in front of me to check your data, but does this at all match what you're seeing?
I know there have been a few bug tracker reports about textscan. Can anyone comment about likely paths to explore there? I also remember seeing something about issues double counting EOL character's, maybe specifically in windows?
Sorry I can't be more helpful.
Happy New Year!
Nick J