Commit 72a8a0be authored by David King's avatar David King

Use g_str_to_ascii() for displaying filenames

Rather than calling iconv() with the extra "//IGNORE" option, call
g_str_to_ascii() with the current locale.
parent c3eac9c2
......@@ -350,9 +350,9 @@ AS_IF([test "x$have_libnautilus_extension" = "xno"],
AM_CONDITIONAL([ENABLE_NAUTILUS_ACTIONS], [test x"$have_libnautilus_extension" != x"no"])
dnl Check the pkg-config dependencies
GIO_DEPS="gio-2.0 >= 2.38.0"
GIO_DEPS="gio-2.0 >= 2.40.0"
AC_SUBST([GLIB_DEPRECATION_FLAGS],
["-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38"])
["-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40"])
GTK_DEPS="gtk+-3.0 >= 3.14.0"
AC_SUBST([GTK_DEPRECATION_FLAGS],
["-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_14 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_14"])
......
......@@ -504,25 +504,7 @@ filename_from_display (const gchar *string)
break;
case ET_RENAME_ENCODING_TRANSLITERATE:
{
/* iconv_open (3):
* When the string "//TRANSLIT" is appended to tocode,
* transliteration is activated. This means that when a
* character cannot be represented in the target character set,
* it can be approximated through one or several similarly
* looking characters.
*/
/* TODO: Use g_str_to_ascii() in GLib 2.40. */
gchar *enc = g_strconcat (*filename_encodings, "//TRANSLIT", NULL);
ret = g_convert (string, -1, enc, "UTF-8", NULL, NULL, &error);
if (!ret)
{
g_debug ("Error while converting filename from display to transliterated encoding '%s': %s",
enc, error->message);
g_clear_error (&error);
}
g_free (enc);
ret = g_str_to_ascii (string, NULL);
break;
}
case ET_RENAME_ENCODING_IGNORE:
......
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