[vinagre] Fixed clipboard copy operation if it contains special chars.



commit 4d3c0329997f13e888d07be8fe67a3a887166a0e
Author: Jonh Wendell <jwendell gnome org>
Date:   Thu Aug 6 17:50:29 2009 -0300

    Fixed clipboard copy operation if it contains special chars.
    
    Closes #577150.

 plugins/vnc/vinagre-vnc-tab.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/plugins/vnc/vinagre-vnc-tab.c b/plugins/vnc/vinagre-vnc-tab.c
index a00cbe5..0a75818 100644
--- a/plugins/vnc/vinagre-vnc-tab.c
+++ b/plugins/vnc/vinagre-vnc-tab.c
@@ -887,16 +887,22 @@ void
 vinagre_vnc_tab_paste_text (VinagreVncTab *tab, const gchar *text)
 {
   gchar *out;
-  size_t a, b;
-  g_return_if_fail (VINAGRE_IS_VNC_TAB (tab));
+  gsize a, b;
+  GError *error = NULL;
 
-  out = g_convert (text, -1, "iso8859-1", "utf-8", &a, &b, NULL);
+  g_return_if_fail (VINAGRE_IS_VNC_TAB (tab));
 
+  out = g_convert_with_fallback (text, -1, "iso8859-1//TRANSLIT", "utf-8", NULL, &a, &b, &error);
   if (out)
     {
       vnc_display_client_cut_text (VNC_DISPLAY (tab->priv->vnc), out);
       g_free (out);
     }
+  else
+    {
+      g_warning ("%s", error->message);
+      g_error_free (error);
+    }
 }
 
 gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]