[mapserver-dev] Encoding/windows

Ned Harding nharding at extendthereach.com
Tue Feb 26 18:58:40 EST 2008

Hey All,
Here is a tiny little patch I would propose.  It makes UTF-8 (and only
UTF-8) encoding work on windows without having iconv.h.  Seems like it
wouldn't have any side effects - it is certainly working for me...
Index: S:/3rdParty/GIS/MapServer/mapstring.c
--- S:/3rdParty/GIS/MapServer/mapstring.c (revision 14821)
+++ S:/3rdParty/GIS/MapServer/mapstring.c (working copy)
@@ -1072,6 +1072,9 @@
   return out;
+  if (*string == 0 || (encoding && strcasecmp(encoding, "UTF-8")==0))
+      return strdup(string);    /* Nothing to do: string already in
UTF-8 */
   msSetError(MS_MISCERR, "Not implemeted since Iconv is not enabled.",
   return NULL;


More information about the mapserver-dev mailing list