From 6567df6fdf5f2265e4c1192411b44cde08a74109 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 31 Mar 2010 14:50:53 +0000 Subject: [PATCH] Dump more informations about failing decoding git-svn-id: http://svn.osgeo.org/postgis/trunk@5472 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/shp2pgsql-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader/shp2pgsql-core.c b/loader/shp2pgsql-core.c index adf7fe2ca..29a5dcadb 100644 --- a/loader/shp2pgsql-core.c +++ b/loader/shp2pgsql-core.c @@ -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; } -- 2.40.0