src/gtkimhtml.c

changeset 7281
5b448ef8610a
parent 7280
f00e23f50698
child 7287
abe4e3c069d4
--- a/src/gtkimhtml.c	Thu Oct 16 04:17:25 2003 +0000
+++ b/src/gtkimhtml.c	Thu Oct 16 04:35:41 2003 +0000
@@ -757,7 +757,7 @@
 			  gchar       **replace,
 			  gint        *length)
 {
-	static char buf[3];
+	static char buf[6];
 	g_return_val_if_fail (string != NULL, FALSE);
 	g_return_val_if_fail (replace != NULL, FALSE);
 	g_return_val_if_fail (length != NULL, FALSE);
@@ -791,7 +791,7 @@
 		if ((sscanf (string, "&#%u;", &pound) == 1) && pound != 0) {
 			if (*(string + 3 + (gint)log10 (pound)) != ';')
 				return FALSE;
-			g_snprintf(buf, sizeof(buf), "%c", (gchar)pound);
+			g_unichar_to_utf8((gunichar)pound, buf);
 			*replace = buf;
 			*length = 2;
 			while (isdigit ((gint) string [*length])) (*length)++;

mercurial