[Qgis-developer] fopen using binary mode
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Mon Jan 14 07:58:06 EST 2008
I've discovered where my problem with Qgis-Python-R is coming from.
In main.cpp, Qgis sets the default mode for fopen in Windows to binary.
This is inherited down to R which calls fopen(file,"r") to read one of
its config files, which has Windows CR-LF endings. It fails to expect
this, and falls over while parsing it.
I don't know why Qgis sets this, since it violates the principle of
least surprise. Does anyone know why? It could surprise plugin authors too.
I'm happy to go through the source and check every fopen call...
Barry
More information about the Qgis-developer
mailing list