Commit d1d7cb4c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

abort if the configured filename encoding can't be converted to UTF-8.

2004-08-07  Sven Neumann  <sven@gimp.org>

	* app/sanity.c: abort if the configured filename encoding can't be
	converted to UTF-8. Fixes bug #149464 for the HEAD branch.
parent 5ebbc4d6
2004-08-07 Sven Neumann <sven@gimp.org>
* app/sanity.c: abort if the configured filename encoding can't be
converted to UTF-8. Fixes bug #149464 for the HEAD branch.
2004-08-07 Sven Neumann <sven@gimp.org>
* libgimp/gimpgradientmenu.c (gimp_gradient_select_preview_expose):
......
......@@ -25,6 +25,9 @@
#include "sanity.h"
static gchar * sanity_check_filename_encoding (void);
const gchar *
sanity_check (void)
{
......@@ -121,5 +124,39 @@ sanity_check (void)
}
#endif
if (! abort_message)
abort_message = sanity_check_filename_encoding ();
return abort_message;
}
static gchar *
sanity_check_filename_encoding (void)
{
gchar *result;
GError *error = NULL;
result = g_filename_to_utf8 ("foobar", -1, NULL, NULL, &error);
if (result)
{
g_free (result);
return NULL;
}
else
{
gchar *msg =
g_strdup_printf
("The configured filename encoding cannot be converted to UTF-8: "
"%s\n\n"
"Please check the value of the environment variable "
"G_FILENAME_ENCODING.",
error->message);
g_error_free (error);
return msg;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment