mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-09 00:05:52 -04:00
enabled toLocal8Bit for GISDBASE on win
git-svn-id: http://svn.osgeo.org/qgis/trunk@13158 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
0cff6f5ec8
commit
be05a75845
@ -330,11 +330,13 @@ void QgsGrass::setLocation( QString gisdbase, QString location )
|
||||
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 @@ void QgsGrass::setMapset( QString gisdbase, QString location, QString mapset )
|
||||
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() );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user