[Gdal-dev] CPLReadLine problem on windows platforms
Roger James
rogerjames99 at btinternet.com
Fri Aug 29 13:08:13 EDT 2003
Frank,
CPLReadLine has a problem on windows platforms when passed a file
pointer that has been opened in text mode. The underlying removal of
carriage return characters by wijndows causes the fseek positioning to
be wrong.
I have found at least one place where this occurs in cpl_string.cpp
char **CSLLoad(const char *pszFname)
{
FILE *fp;
const char *pszLine;
char **papszStrList=NULL;
// fp = VSIFOpen(pszFname, "rt");
fp = VSIFOpen(pszFname, "rb");
This causes world file parsing to be wrong. My temp fix is in the above
snippet. I do not know if there are other places where this fix is need
or if it causes any side affects. But I can read jgw files on windows
now :-)
I have a vague recollection about reporting this or a similar bug many
moons ago.
Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20030829/41aa53db/attachment.html
More information about the Gdal-dev
mailing list