Opened 14 years ago

#3399 new enhancement

Display item name when msConvertWideStringToUTF8 fails

Reported by: russellmcormond Owned by: pramsey
Priority: normal Milestone:
Component: MapServer C Library Version: 5.4
Severity: normal Keywords:
Cc:

Description

This is a followup to Ticket #2988

The following was very valuable when trying to find a data problem by displaying which item was not able to have its character encoding converted.

--- mapsde.c-fixed      2010-03-23 08:47:24.000000000 -0400
+++ mapsde.c    2010-03-23 08:50:07.000000000 -0400
@@ -755,8 +755,8 @@
                     msFree(wide);
                     if (!shape->values[i]) {  /* There was an error */
                         msSetError( MS_SDEERR,
-                                 "msConvertWideStringToUTF8()==NULL.",
-                                 "sdeGetRecord()");
+                                 "msConvertWideStringToUTF8()==NULL where item='%s'.",
+                                   "sdeGetRecord()",layer->items[i]);
                         shape->values[i] = (char *)malloc(itemdefs[i].size*sizeof(char)+1);
                         shape->values[i][0] = '\0'; /* empty string */
                     }

Change History (0)

Note: See TracTickets for help on using tickets.