Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / client / cmdline / utf8.c
index 40a5ce0..9b87671 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <glib/gmessages.h>
 #include <glib/gerror.h>
+#include <glib/gunicode.h>     /* for g_get_charset() */
 
 
 #include "utf8.h"      /* self */
@@ -28,6 +29,7 @@
 
 gchar *cmd_utf8_macro_malloc_errorchecking(
                gchar *(*func)(const gchar *string,gssize len,gsize *bytes_read,gsize *bytes_written,GError **error),
+               const gchar *func_name,
                const gchar *string)
 {
 GError *error;
@@ -44,8 +46,13 @@ gchar *r;
                        NULL,   /* bytes_written */
                        &error);        /* error */
        if (error) {
-               g_log(G_LOG_DOMAIN,G_LOG_LEVEL_WARNING,"captivefs g_filename_from_utf8(): name=\"%s\": %s",
-                               string,error->message);
+const gchar *charset;
+
+               g_get_charset(&charset);
+               g_log(G_LOG_DOMAIN,G_LOG_LEVEL_WARNING,"captivefs %s(): name=\"%s\"; g_get_charset()=\"%s\", %s: %s",
+                               func_name,string,charset,
+                               _("fix environment variables - locale(7), mount(8) and locale(1) commands \"locale\" and \"locale -a\""),
+                               error->message);
                g_clear_error(&error);
                }
        return r;