Commit 29d11da8 authored by Hidetoshi Tajima's avatar Hidetoshi Tajima

Skip g_convert when to_codeset and from_codeset are both 'UTF-8' (gnome

	* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
	Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
	(gnome bugzilla #58202)
parent a4be7d83
2001-08-06 HideToshi Tajima <tajima@eng.sun.com>
* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
(gnome bugzilla #58202)
2001-08-06 Havoc Pennington <hp@pobox.com> 2001-08-06 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole
......
2001-08-06 HideToshi Tajima <tajima@eng.sun.com>
* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
(gnome bugzilla #58202)
2001-08-06 Havoc Pennington <hp@pobox.com> 2001-08-06 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole
......
2001-08-06 HideToshi Tajima <tajima@eng.sun.com>
* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
(gnome bugzilla #58202)
2001-08-06 Havoc Pennington <hp@pobox.com> 2001-08-06 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole
......
2001-08-06 HideToshi Tajima <tajima@eng.sun.com>
* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
(gnome bugzilla #58202)
2001-08-06 Havoc Pennington <hp@pobox.com> 2001-08-06 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole
......
2001-08-06 HideToshi Tajima <tajima@eng.sun.com>
* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
(gnome bugzilla #58202)
2001-08-06 Havoc Pennington <hp@pobox.com> 2001-08-06 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole
......
2001-08-06 HideToshi Tajima <tajima@eng.sun.com>
* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
(gnome bugzilla #58202)
2001-08-06 Havoc Pennington <hp@pobox.com> 2001-08-06 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole
......
2001-08-06 HideToshi Tajima <tajima@eng.sun.com>
* modules/input/gtkimcontextxim.c (mb_to_utf8), xim_text_to_utf8):
Skip g_convert when to_codeset and from_codeset are both 'UTF-8'
(gnome bugzilla #58202)
2001-08-06 Havoc Pennington <hp@pobox.com> 2001-08-06 Havoc Pennington <hp@pobox.com>
* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole * gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): The whole
......
...@@ -281,14 +281,18 @@ mb_to_utf8 (GtkIMContextXIM *context_xim, ...@@ -281,14 +281,18 @@ mb_to_utf8 (GtkIMContextXIM *context_xim,
GError *error = NULL; GError *error = NULL;
gchar *result; gchar *result;
result = g_convert (str, -1, if (strcmp (context_xim->mb_charset, "UTF-8") == 0)
"UTF-8", context_xim->mb_charset, result = g_strdup (str);
NULL, NULL, &error); else
if (!result)
{ {
g_warning ("Error converting text from IM to UTF-8: %s\n", error->message); result = g_convert (str, -1,
g_error_free (error); "UTF-8", context_xim->mb_charset,
NULL, NULL, &error);
if (!result)
{
g_warning ("Error converting text from IM to UTF-8: %s\n", error->message);
g_error_free (error);
}
} }
return result; return result;
...@@ -603,11 +607,14 @@ xim_text_to_utf8 (GtkIMContextXIM *context, XIMText *xim_text, gchar **text) ...@@ -603,11 +607,14 @@ xim_text_to_utf8 (GtkIMContextXIM *context, XIMText *xim_text, gchar **text)
return 0; return 0;
} }
result = g_convert (xim_text->string.multi_byte, if (strcmp (context->mb_charset, "UTF-8") == 0)
-1, result = g_strdup (xim_text->string.multi_byte);
"UTF-8", else
context->mb_charset, result = g_convert (xim_text->string.multi_byte,
NULL, NULL, &error); -1,
"UTF-8",
context->mb_charset,
NULL, NULL, &error);
if (result) if (result)
{ {
......
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