[GRASS-SVN] r39169 - grass/branches/develbranch_6/lib/gis

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


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

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

Modified: grass/branches/develbranch_6/lib/gis/parser.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/parser.c	2009-09-13 07:56:23 UTC (rev 39168)
+++ grass/branches/develbranch_6/lib/gis/parser.c	2009-09-13 07:56:52 UTC (rev 39169)
@@ -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>
@@ -1280,6 +1283,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