Call g_convert(), not g_convert() with fallback, since Emacs is happier if

Wed Feb 25 15:36:50 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text_for_display):
        Call g_convert(), not g_convert() with fallback, since Emacs is
        happier if we reject the COMPOUND_TEXT request and it can
        then ask for UTF-8. (#114527)

        * gtk/gtkselection.c (gtk_selection_data_set_text): When
        TEXT is requested, if COMPOUND_TEXT fails, fall back to STRING.
This commit is contained in:
Owen Taylor
2004-02-25 23:05:48 +00:00
committed by Owen Taylor
parent df2ab6f687
commit 6139c61d22
2 changed files with 66 additions and 41 deletions

View File

@ -819,15 +819,19 @@ gdk_utf8_to_compound_text_for_display (GdkDisplay *display,
if (need_conversion)
{
locale_str = g_convert_with_fallback (tmp_str, -1,
charset, "UTF-8",
NULL, NULL, NULL, &error);
locale_str = g_convert (tmp_str, -1,
charset, "UTF-8",
NULL, NULL, &error);
g_free (tmp_str);
if (!locale_str)
{
g_warning ("Error converting from UTF-8 to '%s': %s",
charset, error->message);
if (!(error->domain = G_CONVERT_ERROR &&
error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE))
{
g_warning ("Error converting from UTF-8 to '%s': %s",
charset, error->message);
}
g_error_free (error);
if (encoding)