[QGIS Commit] r13158 - trunk/qgis/src/providers/grass

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Mar 25 05:36:59 EDT 2010


Author: rblazek
Date: 2010-03-25 05:36:57 -0400 (Thu, 25 Mar 2010)
New Revision: 13158

Modified:
   trunk/qgis/src/providers/grass/qgsgrass.cpp
Log:
enabled toLocal8Bit for GISDBASE on win

Modified: trunk/qgis/src/providers/grass/qgsgrass.cpp
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrass.cpp	2010-03-25 09:00:53 UTC (rev 13157)
+++ trunk/qgis/src/providers/grass/qgsgrass.cpp	2010-03-25 09:36:57 UTC (rev 13158)
@@ -330,11 +330,13 @@
   init();
 
   // Set principal GRASS variables (in memory)
-// #if defined(WIN32)
-//  G__setenv(( char * ) "GISDBASE", shortPath( gisdbase ).toLocal8Bit().data() );
-//#else
+#if defined(WIN32)
+  G__setenv(( char * ) "GISDBASE", shortPath( gisdbase ).toLocal8Bit().data() );
+#else
+  // This does not work for GISBAS with non ascii chars on Windows XP,
+  // gives error 'LOCATION ... not available':
   G__setenv(( char * ) "GISDBASE", gisdbase.toUtf8().constData() );
-//#endif
+#endif
   G__setenv(( char * ) "LOCATION_NAME", location.toUtf8().constData() );
   G__setenv(( char * ) "MAPSET", ( char * ) "PERMANENT" ); // PERMANENT must always exist
 
@@ -349,11 +351,11 @@
   init();
 
   // Set principal GRASS variables (in memory)
-// #if defined(WIN32)
-//  G__setenv(( char * ) "GISDBASE", shortPath( gisdbase ).toUtf8().data() );
-// #else
+#if defined(WIN32)
+  G__setenv(( char * ) "GISDBASE", shortPath( gisdbase ).toUtf8().data() );
+#else
   G__setenv(( char * ) "GISDBASE", gisdbase.toUtf8().data() );
-// #endif
+#endif
   G__setenv(( char * ) "LOCATION_NAME", location.toUtf8().data() );
   G__setenv(( char * ) "MAPSET", mapset.toUtf8().data() );
 



More information about the QGIS-commit mailing list