#include <glib/gmessages.h>
#include <glib/gerror.h>
+#include <glib/gunicode.h> /* for g_get_charset() */
#include "utf8.h" /* self */
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;
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;