[GRASS-SVN] r39168 - grass/branches/releasebranch_6_4/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 13 03:56:23 EDT 2009


Author: neteler
Date: 2009-09-13 03:56:23 -0400 (Sun, 13 Sep 2009)
New Revision: 39168

Modified:
   grass/branches/releasebranch_6_4/lib/gis/parser.c
Log:
Attempt to determine message encoding on Windows (merge from trunk, r39134)

Modified: grass/branches/releasebranch_6_4/lib/gis/parser.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/parser.c	2009-09-13 07:44:42 UTC (rev 39167)
+++ grass/branches/releasebranch_6_4/lib/gis/parser.c	2009-09-13 07:56:23 UTC (rev 39168)
@@ -71,6 +71,9 @@
 #if defined(HAVE_LANGINFO_H)
 #include <langinfo.h>
 #endif
+#if defined(__MINGW32__) && defined(USE_NLS)
+#include <localcharset.h>
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -1271,6 +1274,11 @@
     if (!encoding || strlen(encoding) == 0) {
 	encoding = "UTF-8";
     }
+#elif defined(__MINGW32__) && defined(USE_NLS)
+    encoding = locale_charset();
+    if (!encoding || strlen(encoding) == 0) {
+	encoding = "UTF-8";
+    }
 #else
     encoding = "UTF-8";
 #endif



More information about the grass-commit mailing list