aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--support.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/support.c b/support.c
index b55fc0ac7..564fd9b83 100644
--- a/support.c
+++ b/support.c
@@ -11,8 +11,16 @@
#include <locale.h>
#endif
+#ifdef DEBUG
+#define D(x) x
+#else
+#define D(x)
+#endif
+
#define BUFSIZE 1024
+extern void screen_status_printf(char *format, ...);
+
static const char *charset = NULL;
static const char *locale = NULL;
static gboolean noconvert = TRUE;
@@ -148,7 +156,9 @@ utf8_to_locale(char *utf8str)
&error);
if( error )
{
- g_printerr("utf8_to_locale(): %s\n", error->message);
+ screen_status_printf("Error: Unable to convert characters to %s",
+ charset);
+ D(g_printerr("utf8_to_locale(): %s\n", error->message));
g_error_free(error);
return g_strdup(utf8str);
}
@@ -175,7 +185,8 @@ locale_to_utf8(char *localestr)
&error);
if( error )
{
- g_printerr("locale_to_utf8: %s\n", error->message);
+ screen_status_printf("Error: Unable to convert characters to UTF-8");
+ D(g_printerr("locale_to_utf8: %s\n", error->message));
g_error_free(error);
return g_strdup(localestr);
}