moo_filename_from_locale()
parent
f8c9cb338c
commit
39628f23f6
|
@ -339,21 +339,28 @@ moo_filenames_from_locale (char **files)
|
||||||
|
|
||||||
for (i = 0; files && *files; ++files)
|
for (i = 0; files && *files; ++files)
|
||||||
{
|
{
|
||||||
#ifdef __WIN32__
|
conv[i] = moo_filename_from_locale (*files);
|
||||||
conv[i] = g_locale_to_utf8 (*files, -1, NULL, NULL, NULL);
|
|
||||||
|
|
||||||
if (!conv[i])
|
if (!conv[i])
|
||||||
g_warning ("%s: could not convert '%s' to UTF8", G_STRLOC, *files);
|
g_warning ("%s: could not convert '%s' to UTF8", G_STRLOC, *files);
|
||||||
else
|
else
|
||||||
++i;
|
++i;
|
||||||
#else
|
|
||||||
conv[i++] = g_strdup (*files);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return conv;
|
return conv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
moo_filename_from_locale (const char *file)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (file != NULL, NULL);
|
||||||
|
#ifdef __WIN32__
|
||||||
|
return g_locale_to_utf8 (file, -1, NULL, NULL, NULL);
|
||||||
|
#else
|
||||||
|
return g_strdup (file);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/* MSLU for poor
|
/* MSLU for poor
|
||||||
|
|
|
@ -57,6 +57,7 @@ gboolean moo_mkdir (const char *path,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
char **moo_filenames_from_locale (char **files);
|
char **moo_filenames_from_locale (char **files);
|
||||||
|
char *moo_filename_from_locale (const char *file);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C library and WinAPI functions wrappers analogous to glib/gstdio.h
|
* C library and WinAPI functions wrappers analogous to glib/gstdio.h
|
||||||
|
|
Loading…
Reference in New Issue