[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fgetl() on Windows
From: |
John W. Eaton |
Subject: |
fgetl() on Windows |
Date: |
Mon, 11 May 2009 12:51:16 -0400 |
On 11-May-2009, AlexG1 wrote:
| I'm having some trouble using the fgetl() function on a Windows system.
| Every line in a Windows file ends with <cr><lf>. While fgetl() ignores the
| <lf> character it doesn't ignore <cr> (unlike the Matlab version of the same
| function), which can be problematic in some cases (e.g. when I'm reading a
| file path and then try to use fopen() on it - I get fid = -1).
|
| Is there a function which ignores <cr> completely, or should I shorten every
| line that is read by 1 character?
What version of Octave? As I recall, this problem was fixed some time
ago. It seems to work correctly for me wiht 3.0.5 on a Debian system
reading files with CRLF line endings.
jwe