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
@ -40,6 +40,8 @@
|
||||
#include "config/gimpbaseconfig.h"
|
||||
#include "config/gimpconfig-path.h"
|
||||
|
||||
#include "file/file-utils.h"
|
||||
|
||||
#include "pixel-region.h"
|
||||
#include "temp-buf.h"
|
||||
|
||||
@ -714,7 +716,8 @@ temp_buf_swap (TempBuf *buf)
|
||||
/* Check if generated filename is valid */
|
||||
if (g_file_test (filename, G_FILE_TEST_IS_DIR))
|
||||
{
|
||||
g_message ("Error in temp buf caching: \"%s\" is a directory (cannot overwrite)", filename);
|
||||
g_message ("Error in temp buf caching: \"%s\" is a directory (cannot overwrite)",
|
||||
file_utils_filename_to_utf8 (filename));
|
||||
g_free (filename);
|
||||
return;
|
||||
}
|
||||
@ -734,7 +737,8 @@ temp_buf_swap (TempBuf *buf)
|
||||
{
|
||||
unlink (filename);
|
||||
perror ("Write error on temp buf");
|
||||
g_message ("Cannot write \"%s\"", filename);
|
||||
g_message ("Cannot write \"%s\"",
|
||||
file_utils_filename_to_utf8 (filename));
|
||||
g_free (filename);
|
||||
return;
|
||||
}
|
||||
@ -743,7 +747,8 @@ temp_buf_swap (TempBuf *buf)
|
||||
{
|
||||
unlink (filename);
|
||||
perror ("Error in temp buf caching");
|
||||
g_message ("Cannot write \"%s\"", filename);
|
||||
g_message ("Cannot write \"%s\"",
|
||||
file_utils_filename_to_utf8 (filename));
|
||||
g_free (filename);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user