Add new function file_utils_filename_to_utf8(), which is to be used when
2004-01-14 Tor Lillqvist <tml@iki.fi> * app/file/file-utils.[ch]: Add new function file_utils_filename_to_utf8(), which is to be used when converting file names (which are kept in the on-disk encoding) to UTF-8 for passing to GTK, or to g_print() etc. * app/*/*.c: Call file_utils_filename_to_utf8(). Should fix most of the warnings generated by non-UTF8 pathnames. See #130118. * libgimpbase/gimpenv.b: Document that gimp_directory() etc return strings in the on-disk encoding. * libgimpmodule/gimpmodule.c: Convert filenames to UTF-8 (using g_filename_to_utf8()) before passing to g_print().
This commit is contained in:
committed by
Tor Lillqvist
parent
6c4deef6b0
commit
18485018b3
@ -470,7 +470,7 @@ gimp_config_file_copy (const gchar *source,
|
||||
{
|
||||
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
|
||||
_("Could not open '%s' for reading: %s"),
|
||||
source, g_strerror (errno));
|
||||
file_utils_filename_to_utf8 (source), g_strerror (errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ gimp_config_file_copy (const gchar *source,
|
||||
{
|
||||
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
|
||||
_("Could not open '%s' for writing: %s"),
|
||||
dest, g_strerror (errno));
|
||||
file_utils_filename_to_utf8 (dest), g_strerror (errno));
|
||||
fclose (sfile);
|
||||
return FALSE;
|
||||
}
|
||||
@ -490,7 +490,7 @@ gimp_config_file_copy (const gchar *source,
|
||||
{
|
||||
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
|
||||
_("Error while writing '%s': %s"),
|
||||
dest, g_strerror (errno));
|
||||
file_utils_filename_to_utf8 (dest), g_strerror (errno));
|
||||
fclose (sfile);
|
||||
fclose (dfile);
|
||||
return FALSE;
|
||||
@ -501,7 +501,7 @@ gimp_config_file_copy (const gchar *source,
|
||||
{
|
||||
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
|
||||
_("Error while reading '%s': %s"),
|
||||
source, g_strerror (errno));
|
||||
file_utils_filename_to_utf8 (source), g_strerror (errno));
|
||||
fclose (sfile);
|
||||
fclose (dfile);
|
||||
return FALSE;
|
||||
@ -513,7 +513,7 @@ gimp_config_file_copy (const gchar *source,
|
||||
{
|
||||
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
|
||||
_("Error while writing '%s': %s"),
|
||||
dest, g_strerror (errno));
|
||||
file_utils_filename_to_utf8 (dest), g_strerror (errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ gimp_config_file_backup_on_error (const gchar *filename,
|
||||
g_message (_("There was an error parsing your '%s' file. "
|
||||
"Default values will be used. A backup of your "
|
||||
"configuration has been created at '%s'."),
|
||||
name, backup);
|
||||
name, file_utils_filename_to_utf8 (backup));
|
||||
|
||||
g_free (backup);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user