]> granicus.if.org Git - postgis/commitdiff
Dump more informations about failing decoding
authorSandro Santilli <strk@keybit.net>
Wed, 31 Mar 2010 14:50:53 +0000 (14:50 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 31 Mar 2010 14:50:53 +0000 (14:50 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5472 b70326c6-7e19-0410-871a-916f4a2858ee

loader/shp2pgsql-core.c

index adf7fe2ca97a5fe7b9b95958eff4acb5348d8e64..29a5dcadb2e725d6e37dbba631c836e2e0d2c234 100644 (file)
@@ -1152,7 +1152,7 @@ ShpLoaderOpenShape(SHPLOADERSTATE *state)
                        utf8str = utf8(state->config->encoding, name);
                        if (!utf8str)
                        {
-                               snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert field name \"%s\" to UTF-8: iconv reports \"%s\"", name, strerror(errno));
+                               snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert field name \"%s\" from %s encoding to UTF-8: iconv reports \"%s\"", name, state->config->encoding, strerror(errno));
                                return SHPLOADERERR;
                        }
 
@@ -1579,7 +1579,7 @@ ShpLoaderGenerateSQLRowStatement(SHPLOADERSTATE *state, int item, char **strreco
                                utf8str = utf8(state->config->encoding, val);
                                if (!utf8str)
                                {
-                                       snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert field value \"%s\" to UTF-8: iconv reports \"%s\"", val, strerror(errno));
+                                       snprintf(state->message, SHPLOADERMSGLEN, "Unable to convert field value \"%s\" from %s encoding to UTF-8: iconv reports \"%s\"", val, state->config->encoding, strerror(errno));
                                        return SHPLOADERERR;
                                }