[GRASS-SVN] r39134 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 11 23:49:13 EDT 2009
Author: glynn
Date: 2009-09-11 23:49:13 -0400 (Fri, 11 Sep 2009)
New Revision: 39134
Modified:
grass/trunk/lib/gis/parser.c
Log:
Attempt to determine message encoding on Windows
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2009-09-12 03:45:57 UTC (rev 39133)
+++ grass/trunk/lib/gis/parser.c 2009-09-12 03:49:13 UTC (rev 39134)
@@ -77,6 +77,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>
@@ -1311,6 +1314,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